Turned sdDiff(),  madDiff() and varDiff() into plain functions