sample variance in noise calculation, other edits