Adding database initialization code, ready for sandboxed testing.