Rewrite of the type system
Massive update to how we define types. JSON schema is in