Tightens up formatting in queryRecords.