Added checks for S matrix column order and simplified 2SLS