Refactoring Url generating helper