Improved time step between frames and added opengl