Initial pass at introducing MockData

Rewrite of much of the DB layer to support a mock interface to help
simplify testing.