Updates from Tom, fixing  the indexing of x when computing
fits for ncol(x) > 1. Transposed fit.coeff.
Cosmetic changes.