Tidy up

Now only returns z, not x, m, and sd, since this information is not
generally important. Neater code for ShuffleMatrix(). More consistent
variable names.