Improved correlated errors

Function now handles exogenous as well as endogenous variables