Merge pull request #579 from jialinsun/master

refactor code
Merge branch 'master' of https://github.com/dianping/cat