Added finding and storing of input scalars min/max.

See #152.