Remove composite queries.
Add documentation and refactor API.