improve docs; privatize internals