toplevel: preliminary work on global variables