Implemented correct way of handling status code.
Removed unused class
Removed unused class