Refactored external mod logic to the modcompat subsystem.