Added more game logic, refactoring