Refactor database setup to separate file.
Wrap database initialization inside function.