Moved the event loop out of the render loop, increasing granularity of processing, which helps with collision detection.