Cleaned up the long code for Buttons