Main loop and game objects

Added basic structure of main loop and game object code from Azaria.