Move appendOrReplaceNode to the AbstractHelper to keep it DRY; Rename buildFlowBlock to buildFlow.