Master and wunode code updated for protocols