Restructure database access
Restructure database config