Fixed dt value to 1/(max framerate), which fixed a lot of performance issues. Thanks, Simon.
Minor changes
second order update