Refactoring Scalar type