Tidy up generating the query string for local deploys