Cleanup the code for the menus