commhand and idle processes set up. Not tested.
emptying of queues added