Added new functionality, testing and documentation.