Moving DatabaseConnection object to own lib file
Finished refactor