Refactoring checkboxes