Moved the main graphics loop into iomanager and merged with main event loop. This is because all SDL functions must happen in the same thread.£