Complete rewrite, use matrix convolution for diffusion.