Added exception classes and worked on unit test