Remove MPI calls from locfunc and repeated division by CELL_LEN