Cleanup and documentation

This commit provides a large cleanup, renaming request
into query. It also provides some documentation for
some classes.
More documentation