Improved Extract Method when extracting anonymous functions.

Fixes #80