Factor out Db wrapper.
Refactor shared configuration data into new 'config' module.