Core WebSocket provider

Sorry for the messy pull request. I had to merge into master to get some things working.

Fixes #12