Code cleaning up
Merge pull request #339 from liuchuangww/user

Code cleaning up