WIP Added database support and almost but not quite got a DB test working.