Cleaned up code for template, got main menu.

- main menu
- cleaner code