renamed search.py
added db.py and condensed loops to list comprehensions