Refactored core module