app now uses the real database, many JSON calls changed, and access to fields in views