separated main method from game loop class. Added screen boundary restrictions for movement.