Added MainMenu block; added Messages block; refactoring.