Extracted some DB settings into config

Fixed promises in db.sync