Added in the ability to test if a document meets query criteria, spruced up the documentation