More improvements

Consolidated much code.  UI: Application now remembers the last button
pressed.  Made it more clear to the user which button they pressed.