Refining the type system