Extract method refactoring
Add missing core hook handling
Correct comment