Quite a bit of refactoring and styling to make the form cleaner and
simpler.