Cleaned base.py