First refactoring to change checkbox and radio rendering feature