Refactoring types according to return types.