Add MessageInPort and MessageOutPort, and tests.