Some bug fixing in the max(), min() functions.  More tests.
Tests for sort() and sortBy().