New unit tests and documentation added.