Renamed Router. Wrote logic for writeQuery needs to be tested.