Various fixes for chrome.

Basic fixes to enable hello world to work in chrome. Chrome is useful for debugging Function objects.
We should uplift this. Or is this part of the code you added, @mykmelez ?