Fixed many of the add to db functions in model.js with Ruchi.