Refactor url