pull nested functions out of evalNode