Improved checkboxes element - add/remove checked attribute