anchor.diff:      </tr>
   </script>
   
  +<script type="text/template" id="imagesSelectTemplate">
  +    <props:selectProperty name="image">
  +    <option value="">--Please select a VM--</option>
  +    <optgroup label="Virtual machines" class="vmGroup"></optgroup>
  +    <optgroup label="Templates" class="templatesGroup"></optgroup>
  +    </props:selectProperty>
  +</script>
  +
   <script type="text/javascript">
       BS = BS || {};
       BS.Clouds = BS.Clouds || {};
       BS.Clouds.VMWareVSphere = BS.Clouds.VMWareVSphere || {
           refreshOptionsUrl: '<c:url value="${refreshablePath}"/>',
           refreshSnapshotsUrl: '<c:url value="${refreshSnapshotsPath}"/>',
  -        _lastImageId: 0,
  -        _imagesDataLength: 0,
           _dataKeys: [ 'vmName', 'snapshotName', 'cloneFolder', 'resourcePool', 'cloneBehaviour', 'maxInstances'],
  +        selectors: {
  +            imagesSelect: '#image',
  +            activeCloneBehaviour: ".cloneBehaviourRadio:checked"
  +        },
  +        templates: {
  +            imagesTableRow: $j('#imagesTableRowTemplate').html(),
  +            imagesSelect: $j('#imagesSelectTemplate').html()
  +        },
           init: function () {
  -            this.imagesData = {};
               this.$fetchOptionsButton = $j('#vmwareFetchOptionsButton');
  -            this.$addImageButtons = $j('#vmwareAddImageButton');
  +            this.$emptyImagesListMessage = $j('.emptyImagesListMessage');
  +            this.$imagesTableWrapper = $j('.imagesTableWrapper');
  +            this.$imagesTable = $j("#vmwareImagesTable");
  +            this.$imagesDataElem = $j('#${cons.imagesData}');
               this.$options = $j('.vmWareSphereOptions');
  -            this.$image = $j('#image');
  +            this.$image = $j(this.selectors.imagesSelect);
               this.$snapshot = $j('#snapshot');
  -            this.$imagesTableWrapper = $j('.${imagesTableWrapperClass}');
  -            this.$imagesTable = $j("#vmware_images_list");
  -            this.$imagesDataElem = $j('#${cons.imagesData}');
  -            this.$fetchOptionsError = $j("#error_fetch_options");
               this.$cloneFolder = $j("#cloneFolder");
               this.$resourcePool = $j("#resourcePool");
               this.$maxInstances = $j("#maxInstances");
  -            this.$cloneBehaviour = $j("input[name='cloneBehaviour']:checked");
  -            this.$imagesTableRowTemplate = $j('#imagesTableRowTemplate').html();
  -
  +            this.$addImageButtons = $j('#vmwareAddImageButton');
  +            this.$fetchOptionsError = $j("#error_fetch_options");
  +
  +            this._lastImageId = this._imagesDataLength = 0;
               this._initImagesData();
               this._bindHandlers();
               this.refreshOptions();
               this.renderImagesTable();
           },
  -        saveImagesData: function () {
  -            var data = Object.keys(this.imagesData).map(function (imageId) {
  -                return this._dataKeys.map(function (key) {
  -                    return this.imagesData[imageId][key];
  -                }.bind(this)).join(';').replace(/\[Latest version]/g, '');
  -            }.bind(this)).join(';X;:');
  -
  -            if (data.length) {
  -                data+= ';X;:';
  -            }
  -
  -            this.$imagesDataElem.val(data);
  -        },
  -        toggleCloneOptions: function () {
  -            var isClone = this.$cloneBehaviour.val() !== 'START',
  -                $elementsToToggle = $j('.cloneOptionsRow');
  -
  -            $elementsToToggle.toggle(isClone);
  -        },
  -        clearErrors: function () {
  -            this.$fetchOptionsError.empty();
  -        },
  -        addError: function (errorHTML) {
  -            this.$fetchOptionsError
  -                .append($j("<div>").html(errorHTML));
  -        },
  -        validateServerSettings: function () {
  -            var url = $j("#${cons.serverUrl}").val(),
  -                isValid = (/^https:\/\/.*\/sdk$/).test(url);
  -
  -            this.clearErrors();
  -
  -            if (!isValid) {
  -                this.addError("Server URL doesn't seem to be correct. <br/>" +
  -                "Correct URL should look like this: <strong>https://vcenter/sdk</strong>");
  -            }
  -
  -            return isValid;
  -        },
           refreshOptions: function () {
               var self = this,
  -                $loader = $j(BS.loadingIcon);
  +                    $loader = $j(BS.loadingIcon);
   
               if ( ! this.validateServerSettings()) {
                   return false;
  
positive.code:             });
          },
          _visibleValue: function (elem) {
              if (elem.is(":visible")) {
                  return elem.val();
              } else {
                  return "";
              }
          },
          _appendOption: function ($target, value) {
              $target.append($j('<option>').attr('value', value).text(value));
  
negative.code:           </td>
          </tr>
  
          <tr class="hidden cloneOptionsRow">
            <th>
              <label for="resourcePool">Resource pool</label>
            </th>
  