Updated documentation.
Added tests and updated documentation.