For ticket #14 - taking actual function as param

The JS clients now can take a function as a param rather than a string. Also, the tests/clients no longer have escaped quotes.