Refactor urls