Documented and added more tests.