This is much cleaner.
Fixes to the user interface.