Exception class added and minor changes

...