Refactored the checkbox code