Implemented some unit tests. Tweaked GUI and refactored code.

convention was MainWindowTests