Cleaned database.py