Refactor add_checks and del_checks