Add functions and a new constructor to the FlowNode class