docs and some api fixes