address some issues during code review

* split type_traits
* make code clearer
* improve transform_params
* ..etc