Revises web-socket implementation