Docs import needs to be renamed.
Sort __all__ lists.
Clean up query.py.
Sort the names defined by query.py.