Moved db connection to separate file