Refactor common type langType