Add in-memory database support, change tests to use in-memory database.
Add in-memory database support, change tests to use in-memory database.