Simplify the API and document it.