Initial pass at types

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