Break a bunch of code out of typesystem.py
Reenable unused import warnings from flake8
Merge branch 'master' into refactor/typesystem-defaults
Merge branch 'refactor/typesystem-defaults'