Refactored SPARQL queries