Adds min() and max() support.
Further reduction refactoring and cleanup.