Refactored and added a WaveForm Class.