Added in a check for if the name already exists.