Added subs for cofactor and AND computations.