Added comment on how to fix bug.
Fixed a bug where value was erroneously overwritten.
Added function for non linear denoising.