Add join, smax, smin (and clean up blank lines)