Extract core to a new module