Moved all queries to Queries class.