`doReplaceAll, _showReplaceAllPanel` aren't needed. You can just move the functions definitions before both are used.

You can move `_showReplaceAllPanel` and `_closeReplaceAllPanel` above the modal bar html.