some fixes and more inline-doc