Rework code for DND.