Refactoring menus and buttoms