Started implementing message processing graph support.

Minor refactoring.