Minor refactoring. Added main game loop and command interpretation structure.