Attempt to fix most of the unittests + removing old legacy code.
Merge pull request #13 from NielsZeilemaker/test-cleanup

Attempt to fix most of the unittests + removing old legacy code.