Added API inheritance, fixed several waveform bugs