Merged nldiffusion functions into one module with removal of duplicate functions