add return type to closure def
add missing whitespace to expectation
enhance enclosing tree detection