Restored the exception wrapper.
Added message flags to aggregated messages. Added two gateway test modes (without and with IPC).