more tweaks and fixes and some doc