Remove unused variables.
Correctly escape literals in SPARQL queries.