Refactoring base hierarchy, moving to packages.