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

Code cleaning up