The bad idle may be from the v-afc resetting itself. Also, may be another wiring problem that caused the v-afc to reset.

Also, I think it's funny how you have a car that you think is running funny but you still redline it. Good luck.