Pulled out convolution routines into convolutions.c