Yiming's features implemented.
Merge branch 'yiming'