Added local Xa_dot_X and X_dot_Xa and global Xa_dot_X routines.