Added comments to db.py