Refactored cortex