Game loop

We have a game loop, also did some cleanups and other stuff.