convolve() code cleanup