handling of variables

and other minor things