improved search function, changed a few structural things in app.py