Merged the new db stuff