I guess this really affects the previous code, but this kind of nested map stuff should be formatted more nicely. Try to put the `case ...` and `=>` on the same line, then indent the stuff below that, and don't be afraid to create intermediate variables for steps in-between. Also, there's no need to have `map({ case ... })` with the parens, you can do `map { case ... }` instead and skip them. I'd write something like

```
aCols.join(bRows).map {
    case (key, ((rowInd, rowVal), (colInd, colVal))) =>
      ((rowInd, colInd), rowVal * colVal)
  }.reduceByKey(_ + _)
   .map{ case ((row, col), mval) => MatrixEntry(row, col, mval)}
```

or even give a name to the intermediate steps (e.g. after the reduceByKey) and then have `result = entries.map { case (...) => MatrixEntry(...)}`.

Noticed a few of these in the rest of the SVD file.