Added simple synchronization and minor clean up for ZMQ distribution layer.