Cleaned up search.py