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

Code cleaning up