Add structure to query results
Extract method for processing query
Implement multithreaded processing