Fixed tests. Added new tests for class methods. Fix for bug #227