Added detecting outer variables
Fixed a test
Fixed outerVars
build