collapse all variables and functions