Refactored. Load database connection params from app config.