Refactor DB connection into own file