Changes to allow buttons to be used as menu items.