Turn UI "purple" when KB used (partial)

Partial — the UI is removed when the user advances with an Enter or
Tab, but not with other click events (yet). Also did some code cleanup
to put the helper methods and event handlers in different locations.