added indenting
tweaked so it only considers variables defined before the _last_ result to be 'recent'