I agree - ParseUrl() should be refactored for re-use.