modify dir structure and bugfix

1. modify dir structure
2. modify example config
3. fix core bug when configured with ns