major code refactoring. Removed frame rate limiting
better management of game states