Merge "Spin off node generation logic into testable class" into sc-v2-dev