Changed way of inserting items into the DB