Type refactor

合并类型重构的代码