Some style improvements in the buttons
Lots of cleanup and refactoring with the help of JSHint