cleaned up the menus javascript and made separate files