Merge pull request #196 from angathorion/gui-tests-and-tweaks

Implemented some unit tests. Tweaked GUI and refactored code.
Merge pull request #213 from angathorion/gui-tests-and-tweaks

Added missing file to commit.
Dependency fix