Fixed menu button functions and finsihed showButtons function so that it only shows the necessary buttons