Completed message-passing protocol
Added test for webworker support