Refactoring and clean-up of core classes and interfaces