Refactor checks.py (incomplete).