ch_ops.py: added std and var functions, with unit_testing.