Restructure of variables