docs cleanup
general code review and more tests