Added test for endpoint calls.
Slight compiler tweaks.
When make an endpoint call, we pass in an array of arguments.  To ensure that these actually get placed in positional arguments of called function, have wrapper endpoint_called_ prefixed function that does the mapping.