refactored a bit
extracted Timer and LevelManager, added comments