Refactor in type traits