Updated classes and added tests.