Index: oup/current/Tools/Extractor.dfm
===================================================================
--- oup/current/Tools/Extractor.dfm	(revision 219)
+++ oup/current/Tools/Extractor.dfm	(revision 220)
@@ -1,219 +1,200 @@
 inherited Form_Extractor: TForm_Extractor
-  Caption = 'Extractor'
-  ClientHeight = 491
-  ExplicitHeight = 518
+  Caption = 'Form_Extractor'
+  OnCreate = FormCreate
   PixelsPerInch = 96
   TextHeight = 13
-  inherited Splitter1: TSplitter
-    Left = 483
-    Height = 491
-    Align = alRight
-    Visible = False
-    ExplicitLeft = 172
-    ExplicitTop = -8
-    ExplicitHeight = 423
-  end
-  inherited panel_files: TPanel
-    Width = 333
-    Height = 491
-    ExplicitWidth = 333
-    ExplicitHeight = 491
-    inherited filelist: TListBox
-      Width = 333
-      Height = 338
-      MultiSelect = True
-      ExplicitWidth = 333
-      ExplicitHeight = 338
+  inherited panel_basecontent: TPanel
+    inherited splitter_content: TSplitter
+      Left = 300
     end
-    inherited panel_extension: TPanel
-      Width = 333
-      ExplicitWidth = 333
-      inherited Bevel1: TBevel
-        Width = 327
-        ExplicitWidth = 327
-      end
-      inherited combo_extension: TComboBox
-        Width = 325
-        ExplicitWidth = 325
-      end
-      inherited check_zerobyte: TCheckBox
+    inherited panel_files: TPanel
+      Width = 300
+      ExplicitWidth = 300
+      inherited filelist: TListBox
+        Width = 300
+      end
+      inherited panel_extension: TPanel
+        Width = 300
+        inherited bevel_filelist: TBevel
+          Width = 299
+        end
+        inherited combo_extension: TComboBox
+          Width = 296
+        end
+        inherited edit_filtername: TEdit
+          Width = 296
+        end
+      end
+    end
+    inherited panel_content: TPanel
+      Left = 308
+      Width = 290
+      object group_extract: TGroupBox
+        AlignWithMargins = True
+        Left = 6
+        Top = 3
+        Width = 278
+        Height = 415
+        Margins.Left = 6
+        Margins.Right = 6
+        Align = alClient
+        Caption = '2. Select extract-method'
+        TabOrder = 0
+        ExplicitWidth = 138
+        ExplicitHeight = 374
+        DesignSize = (
+          278
+          415)
+        object label_export_sel: TLabel
+          Left = 7
+          Top = 18
+          Width = 62
+          Height = 20
+          AutoSize = False
+          Caption = 'Export ...'
+        end
+        object label_path: TLabel
+          Left = 7
+          Top = 136
+          Width = 30
+          Height = 18
+          AutoSize = False
+          Caption = 'Path:'
+        end
+        object check_dat: TCheckBox
+          Left = 7
+          Top = 75
+          Width = 121
+          Height = 18
+          Caption = 'Export .dat-entries'
+          Checked = True
+          State = cbChecked
+          TabOrder = 0
+        end
+        object check_raw: TCheckBox
+          Left = 7
+          Top = 94
+          Width = 121
+          Height = 18
+          Caption = 'Export .raw-entries'
+          TabOrder = 1
+        end
+        object check_convert: TCheckBox
+          Left = 7
+          Top = 112
+          Width = 121
+          Height = 18
+          Caption = 'Convert files'
+          TabOrder = 2
+        end
+        object radio_selected: TRadioButton
+          Left = 7
+          Top = 36
+          Width = 113
+          Height = 17
+          Caption = 'selected files'
+          Checked = True
+          TabOrder = 3
+          TabStop = True
+        end
+        object radio_all: TRadioButton
+          Left = 7
+          Top = 52
+          Width = 113
+          Height = 17
+          Caption = 'all files in list'
+          TabOrder = 4
+        end
+        object edit_path: TEdit
+          Left = 36
+          Top = 133
+          Width = 168
+          Height = 21
+          Anchors = [akLeft, akTop, akRight]
+          ReadOnly = True
+          TabOrder = 5
+          Text = 'C:\'
+          ExplicitWidth = 276
+        end
+        object btn_path: TButton
+          Left = 210
+          Top = 133
+          Width = 62
+          Height = 21
+          Anchors = [akTop, akRight]
+          Caption = 'Select...'
+          TabOrder = 6
+          OnClick = btn_pathClick
+          ExplicitLeft = 318
+        end
+        object btn_export: TButton
+          Left = 7
+          Top = 180
+          Width = 75
+          Height = 25
+          Caption = 'Export!'
+          TabOrder = 7
+          OnClick = btn_exportClick
+        end
+      end
+      object group_progress: TGroupBox
+        AlignWithMargins = True
+        Left = 6
+        Top = 422
+        Width = 278
+        Height = 104
+        Margins.Left = 6
+        Margins.Top = 1
+        Margins.Right = 6
+        Margins.Bottom = 6
+        Align = alBottom
+        Caption = 'Progress ...'
+        TabOrder = 1
         Visible = False
-      end
-      inherited edit_filtername: TEdit
-        Width = 325
-        ExplicitWidth = 325
-      end
-      inherited combo_connection: TComboBox
-        Width = 263
-        ExplicitWidth = 263
-      end
-    end
-  end
-  inherited content: TPanel
-    Left = 333
-    Width = 150
-    Height = 491
-    ExplicitLeft = 333
-    ExplicitWidth = 150
-    ExplicitHeight = 491
-    object group_extract: TGroupBox
-      AlignWithMargins = True
-      Left = 6
-      Top = 3
-      Width = 138
-      Height = 374
-      Margins.Left = 6
-      Margins.Right = 6
-      Align = alClient
-      Caption = '2. Select extract-method'
-      TabOrder = 0
-      DesignSize = (
-        138
-        374)
-      object label_export_sel: TLabel
-        Left = 7
-        Top = 18
-        Width = 62
-        Height = 20
-        AutoSize = False
-        Caption = 'Export ...'
-      end
-      object label_path: TLabel
-        Left = 7
-        Top = 136
-        Width = 30
-        Height = 18
-        AutoSize = False
-        Caption = 'Path:'
-      end
-      object check_dat: TCheckBox
-        Left = 7
-        Top = 75
-        Width = 121
-        Height = 18
-        Anchors = [akLeft, akTop, akRight]
-        Caption = 'Export .dat-entries'
-        Checked = True
-        State = cbChecked
-        TabOrder = 0
-      end
-      object check_raw: TCheckBox
-        Left = 7
-        Top = 94
-        Width = 121
-        Height = 18
-        Anchors = [akLeft, akTop, akRight]
-        Caption = 'Export .raw-entries'
-        TabOrder = 1
-      end
-      object check_convert: TCheckBox
-        Left = 7
-        Top = 112
-        Width = 121
-        Height = 18
-        Anchors = [akLeft, akTop, akRight]
-        Caption = 'Convert files'
-        TabOrder = 2
-      end
-      object radio_selected: TRadioButton
-        Left = 7
-        Top = 36
-        Width = 113
-        Height = 17
-        Caption = 'selected files'
-        Checked = True
-        TabOrder = 3
-        TabStop = True
-      end
-      object radio_all: TRadioButton
-        Left = 7
-        Top = 52
-        Width = 113
-        Height = 17
-        Caption = 'all files in list'
-        TabOrder = 4
-      end
-      object edit_path: TEdit
-        Left = 36
-        Top = 133
-        Width = 28
-        Height = 21
-        Anchors = [akLeft, akTop, akRight]
-        ReadOnly = True
-        TabOrder = 5
-        Text = 'C:\'
-        OnClick = btn_pathClick
-      end
-      object btn_path: TButton
-        Left = 70
-        Top = 133
-        Width = 62
-        Height = 21
-        Anchors = [akTop, akRight]
-        Caption = 'Select...'
-        TabOrder = 6
-        OnClick = btn_pathClick
-      end
-      object btn_export: TButton
-        Left = 7
-        Top = 180
-        Width = 75
-        Height = 25
-        Caption = 'Export!'
-        TabOrder = 7
-        OnClick = btn_exportClick
-      end
-    end
-    object group_progress: TGroupBox
-      AlignWithMargins = True
-      Left = 6
-      Top = 381
-      Width = 138
-      Height = 104
-      Margins.Left = 6
-      Margins.Top = 1
-      Margins.Right = 6
-      Margins.Bottom = 6
-      Align = alBottom
-      Caption = 'Progress ...'
-      TabOrder = 1
-      Visible = False
-      DesignSize = (
-        138
-        104)
-      object lbl_progress: TLabel
-        Left = 8
-        Top = 40
-        Width = 265
-        Height = 17
-        AutoSize = False
-        Caption = 'Files done: 0/0'
-      end
-      object lbl_estimated: TLabel
-        Left = 8
-        Top = 56
-        Width = 265
-        Height = 17
-        AutoSize = False
-        Caption = 'Estimated finishing time: 00:00:00'
-      end
-      object progress: TProgressBar
-        Left = 8
-        Top = 16
-        Width = 122
-        Height = 17
-        Anchors = [akLeft, akTop, akRight]
-        Smooth = True
-        TabOrder = 0
-      end
-      object btn_abort: TButton
-        Left = 8
-        Top = 72
-        Width = 97
-        Height = 23
-        Caption = 'Abort'
-        Enabled = False
-        TabOrder = 1
-        OnClick = btn_abortClick
+        ExplicitTop = 381
+        ExplicitWidth = 138
+        DesignSize = (
+          278
+          104)
+        object lbl_progress: TLabel
+          Left = 8
+          Top = 40
+          Width = 257
+          Height = 17
+          Anchors = [akLeft, akTop, akRight]
+          AutoSize = False
+          Caption = 'Files done: 0/0'
+          ExplicitWidth = 265
+        end
+        object lbl_estimated: TLabel
+          Left = 8
+          Top = 56
+          Width = 257
+          Height = 17
+          Anchors = [akLeft, akTop, akRight]
+          AutoSize = False
+          Caption = 'Estimated finishing time: 00:00:00'
+          ExplicitWidth = 265
+        end
+        object progress: TProgressBar
+          Left = 8
+          Top = 17
+          Width = 261
+          Height = 17
+          Anchors = [akLeft, akTop, akRight]
+          Smooth = True
+          TabOrder = 0
+          ExplicitWidth = 369
+        end
+        object btn_abort: TButton
+          Left = 8
+          Top = 72
+          Width = 97
+          Height = 23
+          Caption = 'Abort'
+          Enabled = False
+          TabOrder = 1
+          OnClick = btn_abortClick
+        end
       end
     end
Index: oup/current/Tools/Extractor.pas
===================================================================
--- oup/current/Tools/Extractor.pas	(revision 219)
+++ oup/current/Tools/Extractor.pas	(revision 220)
@@ -1,18 +1,20 @@
 unit Extractor;
+
 interface
+
 uses
   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
-  Dialogs, Template, StdCtrls, ExtCtrls, ComCtrls, Menus, Buttons, StrUtils;
+  Dialogs, _TemplateFileList, Menus, StdCtrls, ExtCtrls, Buttons, ComCtrls;
 
 type
-  TForm_Extractor = class(TForm_ToolTemplate)
+  TForm_Extractor = class(TForm_TemplateFileList)
     group_extract: TGroupBox;
+    label_export_sel: TLabel;
+    label_path: TLabel;
     check_dat: TCheckBox;
     check_raw: TCheckBox;
     check_convert: TCheckBox;
     radio_selected: TRadioButton;
-    label_export_sel: TLabel;
     radio_all: TRadioButton;
-    label_path: TLabel;
     edit_path: TEdit;
     btn_path: TButton;
@@ -23,46 +25,24 @@
     progress: TProgressBar;
     btn_abort: TButton;
+    procedure btn_abortClick(Sender: TObject);
     procedure FormCreate(Sender: TObject);
-    procedure btn_abortClick(Sender: TObject);
+    procedure btn_exportClick(Sender: TObject);
     procedure btn_pathClick(Sender: TObject);
-    procedure btn_exportClick(Sender: TObject);
   private
   public
   end;
 
-var
-  Form_Extractor: TForm_Extractor;
 
 implementation
 {$R *.dfm}
-uses Main, Functions, Data, ConnectionManager, FolderBrowser, Exporters;
+uses
+  Data, FolderBrowser, Exporters, _TemplateFile, ConnectionManager, Functions,
+  StrUtils;
 
 
-procedure TForm_Extractor.FormCreate(Sender: TObject);
-begin
-  inherited;
-  Self.AllowMultiSelect := True;
-  edit_path.Text := AppSettings.ExtractPath;
-end;
 
 procedure TForm_Extractor.btn_abortClick(Sender: TObject);
 begin
   ShowMessage('X');
-end;
-
-procedure TForm_Extractor.btn_pathClick(Sender: TObject);
-var
-  fb: TFolderBrowser;
-begin
-  inherited;
-
-  fb := TFolderBrowser.Create(Handle, 'Please select a folder where you want ' +
-        'the files to be stored...', edit_path.Text, False, True);
-  if fb.Execute then
-  begin
-    edit_path.Text := fb.SelectedItem;
-    AppSettings.ExtractPath := edit_path.Text;
-  end;
-  fb.Free;
 end;
 
@@ -129,6 +109,29 @@
 end;
 
+procedure TForm_Extractor.btn_pathClick(Sender: TObject);
+var
+  fb: TFolderBrowser;
+begin
+  inherited;
+
+  fb := TFolderBrowser.Create(Handle, 'Please select a folder where you want ' +
+        'the files to be stored...', edit_path.Text, False, True);
+  if fb.Execute then
+  begin
+    edit_path.Text := fb.SelectedItem;
+    AppSettings.ExtractPath := edit_path.Text;
+  end;
+  fb.Free;
+end;
+
+procedure TForm_Extractor.FormCreate(Sender: TObject);
+begin
+  inherited;
+  Self.AllowMultiSelect := True;
+  edit_path.Text := AppSettings.ExtractPath;
+end;
 
 begin
   AddToolListEntry('extractor', 'Extractor', '');
 end.
+
Index: oup/current/Tools/Preview.dfm
===================================================================
--- oup/current/Tools/Preview.dfm	(revision 219)
+++ oup/current/Tools/Preview.dfm	(revision 220)
@@ -1,83 +1,84 @@
 inherited Form_Preview: TForm_Preview
-  Caption = 'Preview'
+  Caption = 'Form_Preview'
   OnCreate = FormCreate
-  ExplicitWidth = 500
-  ExplicitHeight = 450
   PixelsPerInch = 96
   TextHeight = 13
-  inherited Splitter1: TSplitter
-    OnMoved = Splitter1Moved
-  end
-  inherited content: TPanel
-    object lbl_notpossible: TLabel
-      Left = 16
-      Top = 56
-      Width = 97
-      Height = 65
-      AutoSize = False
-      Caption = 'No preview possible for this filetype'
-      Font.Charset = DEFAULT_CHARSET
-      Font.Color = clWindowText
-      Font.Height = -16
-      Font.Name = 'Tahoma'
-      Font.Style = []
-      ParentFont = False
-      Visible = False
-      WordWrap = True
+  inherited panel_basecontent: TPanel
+    inherited splitter_content: TSplitter
+      OnMoved = Splitter1Moved
     end
-    object img: TImage
-      AlignWithMargins = True
-      Left = 3
-      Top = 23
-      Width = 277
-      Height = 397
-      Align = alClient
-      ExplicitLeft = 0
-      ExplicitTop = 20
-      ExplicitWidth = 313
-      ExplicitHeight = 453
-    end
-    object panel_buttons: TPanel
-      Left = 0
-      Top = 0
-      Width = 283
-      Height = 20
-      Align = alTop
-      BevelOuter = bvNone
-      TabOrder = 0
-      Visible = False
-      OnResize = panel_buttonsResize
-      object btn_dec: TButton
+    inherited panel_content: TPanel
+      object img: TImage
+        AlignWithMargins = True
+        Left = 3
+        Top = 23
+        Width = 384
+        Height = 506
+        Align = alClient
+        ExplicitLeft = 0
+        ExplicitTop = 20
+        ExplicitWidth = 313
+        ExplicitHeight = 453
+      end
+      object lbl_notpossible: TLabel
+        Left = 16
+        Top = 56
+        Width = 97
+        Height = 65
+        AutoSize = False
+        Caption = 'No preview possible for this filetype'
+        Font.Charset = DEFAULT_CHARSET
+        Font.Color = clWindowText
+        Font.Height = -16
+        Font.Name = 'Tahoma'
+        Font.Style = []
+        ParentFont = False
+        Visible = False
+        WordWrap = True
+      end
+      object panel_buttons: TPanel
         Left = 0
         Top = 0
-        Width = 20
+        Width = 390
         Height = 20
-        Caption = '-'
-        Enabled = False
+        Align = alTop
+        BevelOuter = bvNone
         TabOrder = 0
-        OnClick = btn_decClick
-      end
-      object btn_startstop: TButton
-        Left = 21
-        Top = 0
-        Width = 80
-        Height = 20
-        Caption = 'Stop automatic'
-        TabOrder = 1
-        OnClick = btn_startstopClick
-      end
-      object btn_inc: TButton
-        Left = 102
-        Top = 0
-        Width = 20
-        Height = 20
-        Caption = '+'
-        Enabled = False
-        TabOrder = 2
-        OnClick = btn_incClick
+        Visible = False
+        OnResize = panel_buttonsResize
+        ExplicitWidth = 283
+        object btn_dec: TButton
+          Left = 0
+          Top = 0
+          Width = 20
+          Height = 20
+          Caption = '-'
+          Enabled = False
+          TabOrder = 0
+          OnClick = btn_decClick
+        end
+        object btn_startstop: TButton
+          Left = 21
+          Top = 0
+          Width = 80
+          Height = 20
+          Caption = 'Stop automatic'
+          TabOrder = 1
+          OnClick = btn_startstopClick
+        end
+        object btn_inc: TButton
+          Left = 102
+          Top = 0
+          Width = 20
+          Height = 20
+          Caption = '+'
+          Enabled = False
+          TabOrder = 2
+          OnClick = btn_incClick
+        end
       end
     end
   end
-  object timer: TTimer [3]
+  object timer: TTimer
     Enabled = False
     OnTimer = timerTimer
Index: oup/current/Tools/Preview.pas
===================================================================
--- oup/current/Tools/Preview.pas	(revision 219)
+++ oup/current/Tools/Preview.pas	(revision 220)
@@ -1,18 +1,20 @@
 unit Preview;
+
 interface
+
 uses
   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
-  Dialogs, StdCtrls, Template, ExtCtrls, Math, StrUtils,
-  ConnectionManager, OniImgClass, Data, TypeDefs, Menus, Buttons;
+  Dialogs, _TemplateFileList, Menus, StdCtrls, ExtCtrls, Buttons,
+  TypeDefs, OniImgClass;
 
 type
-  TForm_Preview = class(TForm_ToolTemplate)
-    lbl_notpossible: TLabel;
+  TForm_Preview = class(TForm_TemplateFileList)
+    img: TImage;
     panel_buttons: TPanel;
     btn_dec: TButton;
     btn_startstop: TButton;
     btn_inc: TButton;
-    img: TImage;
     timer: TTimer;
+    lbl_notpossible: TLabel;
     procedure FormCreate(Sender: TObject);
     procedure NewFile(fileinfo: TFileInfo);
@@ -37,10 +39,8 @@
   end;
 
-var
-  Form_Preview: TForm_Preview;
-
 implementation
 {$R *.dfm}
-uses Imaging, ImagingComponents, ImagingTypes, jpeg;
+uses
+  ConnectionManager, Math, _TemplateFile;
 
 
@@ -214,2 +214,3 @@
   AddToolListEntry('preview', 'Preview-Window', '');
 end.
+
