Started refactoring Joe's code

Pulled out the button class; moved Joe's code into a separate file
called buttons.py. Added two new work around functions to address the
issues this caused.