Db script update, and minor changes