Type refactoring