continued reworking old functions in checks.hs and types.hs