Better ordering of variables