Rename Type::invariantOf to immutableOf
Use operator[] instead of tdata()
Merge pull request #2088 from 9rnsr/refactor_code

[Refactoring] code