Database Bits & loads of amends & progress

Signed-off-by: Jamie White <hello@jamie-white.com>