Quite a few changes to send/receive message, added atomic(on)/atomic(off) where relevant