Modified the way data are added and stored in the DB.