Adds UrlHelper class.

* Moves duplicate code to helper methods.