Fix component add/change and delete dialogs

Could we add tests for each component that we do this rollback if something bad happens?

Could we also add a todo for giving the user some kind of notification if this happens so they aren't confused if their changes disappear?