Changes to button code