Refactor query params