Rewrote documentation for new API.