Fixed connection issues to DB. Loads connection dynamically based on config file.