Add first unit test

And fix a few issues for that :)
Merge pull request #40 from Makman2/unit

Add first unit test