Added code for section C of the MRCI; cleaned it up.