Refactor common code out of min() and max()
Bump release to 0.6.2