Made changes to DB management