some changes, lots of documentation added. API complete, all tests pass.