Corrected mpi broadcast race condition. Also added preliminary implementation of kernel smoothing.