moved the PID code to the tim0_comp interupt

I also cleaned up some code in the other interupts and removed some
unused variables.