Refactoring (type => custom_type).