MenuButton.cs modified to add better logic for buttons