Updated the range and domain of functions to correctly set field data types.