Adding documentation and test coverage