Changes to base.py that determine local instance