Added checks to see if items exist in the DB first before adding, changing the way location is checked to ensure it isn't checked if it already exists in the DB