updated documentation. changed visibility of certain non-public functions