Implemented some unit tests. Tweaked GUI and refactored code.

...GetMessage? GetMessage should also remove the need for you to use Sleep.