Refactored core