Major project refactoring

A lot of new methods were created, several new classes.
Main change - separate the user interface, from the game engine and from
the main game class.