Core refactor