Some code cleanup and revisions.

I had initially tried to put the objects into a separate sub class but
WindowsBuilder wouldn't load them correctly.