MOSYNC-EXT: Obviously better marshalling (JavaScript)