Worked out a couple of bugs adding and deleting