Main menu fixing erros

I added the template for the main menu.
Improving the controller

Now, check first it the DB is empty and download the data via AJAX.