close menu item

Updated the close menu item so that it functions. More refactoring.