BFGS is now performed on ZRotFile. Replaces amat->exp() with diagonalization-based logic to make sure that there is no error.