Abstracted the node task into a proper NodeTask struct