QR decomposition now produces correct triangular R matrices. TODO: make Q matrices work.