Refactoring of the core module