more docs and some test fixes