Almost done converting to a naive type system