WebException handling and removed unused class