Included domain detection and refactored SparqlQueryFactory.