Entirely rewriten project

The project is divided in different files and classes and the whole game
is rewriten and refactored.