Solved #1 by changing WeightedGaussian and SelfQuotientImage to take sigma instead of the variance.