Refactor urls module