Added exceptions, tests on class variables