Database update and some minor changes