Adds and deletes working (mostly)

Still an error when adding new elements after deleting one. Only a
problem if you don't submit changes between delete and add