Code re-jigging to load DB.