move helpers across
Added Ehsan's GainNode test