Shouldn't this be encapsulated in `normalizeQuery()`?