TINS-165 move type system to core