Replaces sbt AJAX calls with web socket. Also some refactoring of code.

Sounds good to me.