Unit tests

Proposal for little bit different project structure and some unit tests. Actually one unit test is still failing.