more docs and cleanups