Robustness in add, remove, rename

Made add, remove, rename a bit more consistent and robust.