Reorganized CE struct. Added running averaging class.