Code cleanup, refactor oscillator, implement IOscillator interface