websockets got broken from removal of protocol helper object
moved some more functions from protocol helper into module level