Improve docstrings and hide some more private API