Corrected writing out of MTTVAR matrix - now does this id non-zero
number of variables - not vv!