Some doc. fixes
Some minor fixes

Fixed som wrong spellings in cooments, reordering
some arguments to be mor uniform, and fixed a small bug in
isUniform for 3d matrix.