Ironed out bugs in delete