Added support for scope preservation!

This is specifically necessary when the inner functions scope will be changed when passed to an other function. Think of map, event handlers, jquery etc.