Engine Revving Issue
So, I've been having this problem while driving for the last few months now, and I don't know what it is or what's causing it. This only happens when the engine is warmed up after driving around for a while. Before I start, I have a 2000 Celica GTS 6-speed manual transmission. As I'm driving around, the car runs smoothly like nothing's wrong with it, but as soon as I shift into neutral and coast in neutral, the engine revs up and down a couple of times and the RPM needle fluctuates up and down for a while and then it stops. This also happens when I shift into neutral and apply the brakes due to a stop sign or a red light. Even when I am fully stopped, the engine still revs for a bit, and then stops when it wants to. This doesn't just happen occasionally, it happens everytime I drive the car and everytime I shift into neutral whether or not I apply the brakes.
Another thing is that when I am in gears 1 or 2, it does the same thing, which, in turn, causes the car to jerk back and forth when I am travelling below 30mph. I have searched numerous sites, but I still can't find what exactly is wrong with it. I assumed it was probably the AC being on, but it occurs when the AC is not on, too. So, that is probably not it. Any help would be appreciated. Thank you.