Basic runloop with rendering and event listening added