Clean up code in UrlService and ContextService.

 - There were a few places where values were attached as fields to returned
   objects, but used only locally. I replaced these with local variables.
 - Where object had their fields populated, then were immediately returned,
   I moved the object instantiation to the return statement. This makes it
   more obvious what is being returned. It is also less verbose.
Add .orig to .gitignore.