Initial pass at types

First run at types, trying to keep as much unnecessary and registrar-specific stuff out as possible.
exposed-modules, not other-modules