Refine EncDemo.
Merge pull request #1292 from zhilwang/EncDemo_refine

Refine EncDemo.