docs and some improvements