Mildly more documentation.
Clean up the permutation API and document it.