Moved some re-usable classes from Sparqlify to here.