Clean up db.py