Started implementing db layer, added IPreparable.