Core refactoring