Restructuring and refactoring the base classes and interfaces.