Added mode switching to MP machine.