added game class, re-located game loop to game class