query-sparql minor code improvements