added delete to api, and adding/removing to the list when adding or deleting, regardless of ajax success or failure