Final implementation of Spectrogram class