Added some comments. Made game loop