Cleaned Up discovery.py