I don't know if you expect me to read through the whole program or what, but it looks pretty similar to our demo line following code. You have increased the max speed a lot without changing the constants much, except that you decreased the proportional constant by a lot. Here is the most critical line:
int power_difference = proportional/2000 + integral/10500 + derivative * 1.3 ;
I notice that you are casually using a floating point value of 1.3 in the expression. That is asking a lot for a tiny processor when you are expecting this computation to take a small fraction of a millisecond! I am not sure about the exact timing, but I suspect that doing derivative*4/3 is going to be much more efficient. That is why we wrote it that way in the first place.
Anyway, I suggest you go through the PID tuning strategy described in the link from my previous post. Basically, start with only a proportional term, increase it until you reach the limit of stability, set it to about half of that value, and add in just enough of a derivative term to prevent overshooting. After that you can experiment with the effect of the integral term.