add tests and clean up
Merge branch 'feature-add-some-tests'