fix globals definition
define now produce lambdas, so move some definitions to lambdas, simplify cond, fix quote token