Checkbox: Refactoring

making it easier to understand and removing programatic clicks generated by jquery