finish the type system design, with document for it.