Refactor JsAction.