- fixed wrong implementation of custom delete operation

- some code reordering and cleaning
- limit the width of the custom delete confirmation dialog