Checkbox check color changed and code refactoring