Database upgrade & few modifications