Added register in constructors for base classes and modified tests.