Further unit testing and comments