Refactor ValueNode to CortexNode