Modified app.py to work with several types of location strings.