Updated type system and library