Re-structured database connection to a different file and make models.js actually work.