Refactoring database config
Readme revised