Changes to wavelet transform code