Caught exceptions on incorrect URL.
Organized imports and added missing GPL headers.