Improved update/draw-loop.