Refactored url methods