(Menu) Refactor code to cut down on code duplication