anchor.diff:                  },
   
                   onSuccess: function (response) {
  -                  $j(".images-list-wrapper").show(200);
  -                    var $root = $j(BS.Util.documentRoot(response)),
  -                        $vms = $root.find('VirtualMachines:eq(0) VirtualMachine'),
  -                        $pools = $root.find('ResourcePools:eq(0) ResourcePool'),
  -                        $folders = $root.find('Folders:eq(0) Folder'),
  -                        appendOption = function(target, value) {
  -                            target.append($j("<option>").attr("value", value).text(value));
  -                        };
  -
  -                    if (! $vms.length) {
  +                    var $response = $j(response.responseXML),
  +                            $vms = $response.find('VirtualMachines:eq(0) VirtualMachine'),
  +                            $pools = $response.find('ResourcePools:eq(0) ResourcePool'),
  +                            $folders = $response.find('Folders:eq(0) Folder');
  +
  +                    if (!$vms.length) {
                           return;
                       }
   
  -                    $j('#image')
  -                        .find("option, optgroup").remove().end()
  -                        .append($j("<option>").val("").text("--Please select a VM--"))
  -                        .append($j("<optgroup>").attr("label", "Virtual machines"));
  +                    self.$image
  +                            .find('option, optgroup').remove().end()
  +                            .append($j('<option>').val('').text('--Please select a VM--'))
  +                            .append($j('<optgroup>').attr('label', 'Virtual machines'));
   
                       $vms.each(function () {
                           if ($j(this).attr('template') == 'false') {
  -                            appendOption($j("#image optgroup[label='Virtual machines']"), $j(this).attr('name'));
  +                            self._appendOption(self.$image.find("optgroup[label='Virtual machines']"), $j(this).attr('name'));
                           }
                       });
   
  -                    $j('#image').append($j("<optgroup>").attr("label", "Templates"));
  +                    self.$image.append($j("<optgroup>").attr("label", "Templates"));
   
                       $vms.each(function () {
                           if ($j(this).attr('template') == 'true') {
  -                            appendOption($j("#image optgroup[label='Templates']"), $j(this).attr('name'));
  +                            self._appendOption(self.$image.find("optgroup[label='Templates']"), $j(this).attr('name'));
                           }
                       });
   
                       $j("#resourcePool").find("option").remove();
                       $pools.each(function () {
  -                        appendOption($j('#resourcePool'), $j(this).attr('name'));
  +                        self._appendOption($j('#resourcePool'), $j(this).attr('name'));
                       });
   
                       $j("#cloneFolder").find("option").remove();
                       $folders.each(function () {
  -                        appendOption($j("#cloneFolder"), $j(this).attr('name'));
  +                        self._appendOption($j("#cloneFolder"), $j(this).attr('name'));
                       });
   
                       self.showOptions();
  
positive.code:             }
  
              this.$fetchOptionsButton.attr('disabled', true);
              $loader.insertAfter($j('#vmwareFetchOptionsButton'));
  
              BS.ajaxRequest(this.refreshOptionsUrl, {
                  parameters: BS.Clouds.Admin.CreateProfileForm.serializeParameters(),
  
                  onComplete: function() {
                      $loader.remove();
                      self.$fetchOptionsButton.attr('disabled', false);
                  },
  
negative.code: 
              return false; // to prevent link with href='#' to scroll to the top of the page
          },
          validateOptions: function () {
              var cloneFolder = $j("#cloneFolder").val(),
                      resourcePool = $j("#resourcePool").val(),
                      cloneBehaviour = $j("#cloneBehaviour").val(),
                      maxInstances = $j("#maxInstances").val(),
                      isValid = true;
  
              // checking properties
              $j("#error_image").empty();
              $j("#error_cloneBehaviour").empty();
  
              if (!this.$image.val()) {
                  $j("#error_image").append($j("<div>").text("Please select a VM"));
                  isValid = false;
              }
              if (this.$image.find(":selected").parent().attr("label") == 'Templates' && cloneBehaviour == 'START') {
                  $j("#error_cloneBehaviour").append($j("<div>").text("Start/Stop mode is not available for readonly(template) VMs"));
                  isValid = false;
              }
              if ( !this.$snapshot.val()  && cloneBehaviour == "LINKED_CLONE") {
                  $j("#error_cloneBehaviour").append($j("<div>").text("Linked clone mode requires an existing snapshot"));
                  isValid = false;
              }
  
              return isValid;
          },
          addImage: function () {
              var vmName = $j("#image option:selected").text(),
                      snapshotName = $j("#snapshot option:selected").text(),
                      cloneFolder = $j("#cloneFolder").val(),
                      resourcePool = $j("#resourcePool").val(),
                      cloneBehaviour = $j("#cloneBehaviour").val(),
                      maxInstances = $j("#maxInstances").val();
  
              if (this.validateOptions()) {
                  this._addImage(vmName, snapshotName, cloneFolder, resourcePool, cloneBehaviour, maxInstances);
                  this.updateImagesData();
              }
  
              return false; // to prevent link with href='#' to scroll to the top of the page
          },
          _addImage: function (vmName, snapshotName, cloneFolder, resourcePool, cloneBehaviour, maxInstances) {
              this.$imagesList.append($j("<tr>")
                  .append($j("<td>").text(vmName))
                  .append($j("<td>").text(snapshotName))
                  .append($j("<td>").text(cloneFolder))
  