refactored / cleaned up code in Node and DD