Updated queries to handle newer RDF model.