Fixed NPE
Fixed renaming of vars and functions
Improved introduce variable to suggest parent expressions as well (closes #20)