Updates to JS monitor (can now accept queries on non document objects)