Refactor checking