little refactor for namespace related
Merge pull request #368 from niedhui/master

little refactor for namespace related