refactored query fetch file structure
added test classes for fetching queries
improved catching of virtuoso sparql compilation errors