Refactored the query folder