Implemented the wavelets, the nice way using only matrix operations