Created a NodeData class and made node inheirit from it. No external (relative to the node class) changes need to be made on the code. Everything is sufficiently abstracted to function properly.