refact config and router
add Database class
Merge branch 'master' of https://github.com/joychao/clear