added class names to parent checkboxes
code refactored. Making objects for parent checkboxes