Fixes #32; refactor unittests
Merge pull request #33 from mihaineacsu/32-refactor-unittests

Fixes #32; refactor unittests