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

Code cleaning up