update db stuff and some templates