Added a couple of URL examples.
Converted code to use try-with-resources.