Added a "delete" update mode and fixed bugs.