Enhancements to the derivation of the method to calculate the A matrix.