Remove code from db init file.
Simplify tests.
Fix store scoping issue in session tests.