Added unit tests
Merge branch 'tests'