Checkbox tests
Minor refactoring