Simplify new API and polish documentation.