Merge pull request #341 from liuchuangww/user

Fix search
Code cleaning up