More doc work as well as added some tests.