Ripping more code out of wavesurfer