Eliminate 40+ lines of duplicate types and ensure type safety
Eliminate 40+ lines of duplicate types and ensure type safety