Refactoring database connection
Refactoring database connection