Extended game loop code.

Added update call to startGameLoop() and improved documentation.