Unit testing
Add some preliminary unit testing (not completed).