Refactoring menu and buttoms