refactor class design.
Merge remote-tracking branch 'origin/cc' into cc