Improved type system