Refactor certain init methods in NodeData class.