Move configure_db() function in dedicated module (db.py)