Adding module splitting logic