Fixed updating/inserting problem.

Software now inserts on new items, updates on old.

Needs delete function.