Improve the clearance process and fix select-all checkboxes