Converted to use numpy and FFT for faster convolution.