Merge with Ding's stuff.