Added DB stuff

Made the DB more clearly able to set up.

Fixed some stuff in the config.