Std dev clean

As discussed in #764.