Refactor with client class and refactor sdtDeviation.