Cleanup.

 * Formatting (braces, indent, conditionals, array declaration, ...).
 * Reduce variable's scope.
 * Temporary variable to avoid multiple accesses to the same array element.
 * Use "final" keyword.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/commons-math