When construction hidden variable representation create a new set of variables, also added some tests.