Refactor WebsocketFrame code