Add unit testing
Fix tests
Merge branch 'develop'