Changing the way database connection is fetched to seperate file.