anchor.diff:      return true;
     };
   
  -  var fileButtons =  $('#file-operations');
  -  var newFile = fileButtons.find('#new');
  -  var renameFile = fileButtons.find('#rename');
  -  var deleteFile = fileButtons.find('#delete');
  +  const fileButtons =  $('#file-operations');
  +  const newFile = fileButtons.find('#new');
  +  const renameFile = fileButtons.find('#rename');
  +  const deleteFile = fileButtons.find('#delete');
   
     newFile.click(function() {
  -    var initialFilename = 'filename' + cd.extensionFilename();
  -    var okInitiallyDisabled = !isValidFilename(initialFilename);
  -    var okClicked = function(filename) {
  +    const initialFilename = 'filename' + cd.extensionFilename();
  +    const okInitiallyDisabled = !isValidFilename(initialFilename);
  +    const okClicked = function(filename) {
         cd.newFileContent(filename, '');
  -      cd.loadFile(filename); // hack to get focus
  +      cd.loadFile(filename); // to get focus
       };
       openDialog('new', initialFilename, okInitiallyDisabled, okClicked);
     });
   
     renameFile.click(function() {
  -    var initialFilename = cd.currentFilename();
  -    var okInitiallyDisabled = true;
  -    var okClicked = function(filename) {
  +    const initialFilename = cd.currentFilename();
  +    const okInitiallyDisabled = true;
  +    const okClicked = function(filename) {
         renameFileFromTo(initialFilename, filename);
       };
       openDialog('rename', initialFilename, okInitiallyDisabled, okClicked);
     });
   
     deleteFile.click(function() {
  -    var initialFilename = cd.currentFilename();
  -    var okInitiallyDisabled = false;
  -    var okClicked = function(filename) {
  +    const initialFilename = cd.currentFilename();
  +    const okInitiallyDisabled = false;
  +    const okClicked = function(filename) {
         cd.deleteFile(filename);
       };
       openDialog('delete', initialFilename, okInitiallyDisabled, okClicked);
  
positive.code: 
  $(function() {
  
    var openDialog = function(name, initialFilename, okInitiallyDisabled, okClicked) {
      var input = makeInput(name, initialFilename);
      var ok = {
        text: 'ok',
        id: 'file-ok',
        disabled: okInitiallyDisabled,
        click: function() {
          var newFilename = $.trim(input.val());
          okClicked(newFilename);
          $(this).remove();
        }
      };
      var cancel = {
        text: 'cancel',
        click: function() { $(this).remove(); }
      };
      var div = $('<div>');
      div.append(input);
      var fileOperationDialog = div.dialog({
        closeOnEscape: true,
        close: function() { $(this).remove(); },
    	  title: cd.dialogTitle(name + '&nbsp;file'),
  
negative.code:       buttons: [ ok, cancel ]
      });
    	input.keyup(function(event) {
        const ok = $('#file-ok');
        const newFilename = $.trim(input.val());
        event.preventDefault();
        if (isValidFilename(newFilename))  {
          ok.button('enable');
  