Major reworking of nodes to make interface more generic. More logic is
moved to the nodes.