Use Open-URI to correctly handle url redirects
Whitespace fixes