Handle entwinement with functions, free variables, bound variables