Move parse-params into query