Refractored menu to menu.js