First working version of noise estimation!