Added multithreading to some sparql queries.