refactor web socket partials