Updates to create db. Warning: Needs proper testing