Gram-Schmidt process. Still buggy code.