revisited least squares with QR.

Use triangular solver instead of inverting R.  Updated solutions.