changed data structures as called for in data.txt and added database calls to app.py.