Improved gameplay

Improved gameplay and improved coding style