updates to make database.json work and edits to unit tests.