Cleaned up some of the code, added a few buttons, and shuffled the layout a bit.