Added in message encoder to pipeline, bug fixes.