Refined SPARQL, added output, added stats