Converted the buttons to use the button function.