Move Gain instantiation out of Oscillator constructor, and use connect method instead.