Moved 'typical' linear filter computation outside of some loops. Now
normalizing by standard deviation, rather than variance, and removed an
incorrect final normalization step I had been doing.