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.
Please revert back this change and add a comment at the top saying this script needs to be executed from the root directory