Refactored checkbox to be more clean