Added tests and source documentation.