[gnome-subtitles] Cleaned trailing whitespaces, as suggested by Shlomi Fish (bug #702273)



commit 47191c1a6c3f7ca158594161a3ff2cb2532a218d
Author: Pedro Castro <pedro gnomesubtitles org>
Date:   Fri Jun 14 23:49:40 2013 +0100

    Cleaned trailing whitespaces, as suggested by  Shlomi Fish (bug #702273)

 src/External/GStreamerPlaybin/Engine.cs            |  252 ++++++++++----------
 src/External/GStreamerPlaybin/Events.cs            |   48 ++--
 src/GnomeSubtitles/Core/Backup.cs                  |   42 ++--
 src/GnomeSubtitles/Core/Base.cs                    |  132 +++++-----
 src/GnomeSubtitles/Core/Clipboards.cs              |   16 +-
 .../Core/Command/AdjustTimingsCommand.cs           |   38 ++--
 src/GnomeSubtitles/Core/Command/BaseCommand.cs     |   22 +-
 .../Core/Command/ChangeFrameRateCommand.cs         |   16 +-
 .../Core/Command/ChangeStyleCommand.cs             |    4 +-
 .../Core/Command/ChangeTimingCommand.cs            |   30 ++--
 .../Core/Command/CommandActivatedArgs.cs           |    2 +-
 src/GnomeSubtitles/Core/Command/CommandManager.cs  |  102 ++++----
 src/GnomeSubtitles/Core/Command/CommandTarget.cs   |    2 +-
 .../Core/Command/DeleteSubtitlesCommand.cs         |   14 +-
 .../Core/Command/DeleteTextCommand.cs              |    2 +-
 .../Core/Command/DeleteTextContentCommand.cs       |   28 +-
 .../Core/Command/DeleteTranslationCommand.cs       |    2 +-
 .../Core/Command/FixedMultipleSelectionCommand.cs  |   22 +-
 .../Core/Command/FixedSingleSelectionCommand.cs    |   12 +-
 .../Core/Command/InsertSubtitleCommand.cs          |   36 ++--
 .../Core/Command/InsertTextCommand.cs              |    2 +-
 .../Core/Command/InsertTextContentCommand.cs       |   24 +-
 .../Core/Command/InsertTranslationCommand.cs       |    2 +-
 .../Core/Command/MergeSubtitlesCommand.cs          |   14 +-
 .../Core/Command/MultipleSelectionCommand.cs       |   22 +-
 .../Core/Command/ReplaceAllCommand.cs              |   10 +-
 .../Core/Command/ShiftTimingsCommand.cs            |   18 +-
 .../Core/Command/SingleSelectionCommand.cs         |    4 +-
 .../Core/Command/SplitSubtitlesCommand.cs          |   18 +-
 .../Core/Command/SynchronizeTimingsCommand.cs      |   12 +-
 .../Core/Command/TranslatorCommand.cs              |   16 +-
 .../Core/Command/VideoSetSubtitleTimingCommand.cs  |   16 +-
 src/GnomeSubtitles/Core/Config.cs                  |   48 ++--
 src/GnomeSubtitles/Core/Document.cs                |   88 ++++----
 src/GnomeSubtitles/Core/DragDrop.cs                |    4 +-
 src/GnomeSubtitles/Core/EncodingDescription.cs     |   14 +-
 src/GnomeSubtitles/Core/Encodings.cs               |   34 ++--
 src/GnomeSubtitles/Core/EventHandlers.cs           |  186 +++++++-------
 src/GnomeSubtitles/Core/GlobalAccelerators.cs      |   20 +-
 src/GnomeSubtitles/Core/Search.cs                  |   36 ++--
 src/GnomeSubtitles/Core/SpellLanguage.cs           |   38 ++--
 src/GnomeSubtitles/Core/SpellLanguages.cs          |   84 ++++----
 src/GnomeSubtitles/Core/SyncPoints.cs              |   32 ++--
 src/GnomeSubtitles/Core/Util.cs                    |   68 +++---
 src/GnomeSubtitles/Dialog/AboutDialog.cs           |   14 +-
 src/GnomeSubtitles/Dialog/BaseDialog.cs            |   14 +-
 src/GnomeSubtitles/Dialog/DialogScope.cs           |    4 +-
 src/GnomeSubtitles/Dialog/EncodingsDialog.cs       |   78 +++---
 src/GnomeSubtitles/Dialog/FileOpenDialog.cs        |   74 +++---
 src/GnomeSubtitles/Dialog/FilePropertiesDialog.cs  |   24 +-
 src/GnomeSubtitles/Dialog/FileSaveAsDialog.cs      |    2 +-
 .../Dialog/FileTranslationOpenDialog.cs            |    6 +-
 src/GnomeSubtitles/Dialog/GladeDialog.cs           |    8 +-
 src/GnomeSubtitles/Dialog/HeadersDialog.cs         |   84 ++++----
 src/GnomeSubtitles/Dialog/MessageDialog.cs         |   34 ++--
 src/GnomeSubtitles/Dialog/PreferencesDialog.cs     |   46 ++--
 src/GnomeSubtitles/Dialog/SearchDialog.cs          |   66 +++---
 src/GnomeSubtitles/Dialog/SetLanguageDialog.cs     |   38 ++--
 src/GnomeSubtitles/Dialog/SetTextLanguageDialog.cs |    2 +-
 .../Dialog/SetTranslationLanguageDialog.cs         |    2 +-
 .../Dialog/SubtitleFileSaveAsDialog.cs             |   20 +-
 src/GnomeSubtitles/Dialog/TimingsAdjustDialog.cs   |   36 ++--
 src/GnomeSubtitles/Dialog/TimingsShiftDialog.cs    |   28 +-
 .../Dialog/TimingsSynchronizeDialog.cs             |   82 ++++----
 .../Dialog/TranslationSaveAsDialog.cs              |    2 +-
 .../Dialog/Unmanaged/BasicErrorDialog.cs           |    6 +-
 src/GnomeSubtitles/Dialog/Unmanaged/ErrorDialog.cs |    8 +-
 .../Dialog/Unmanaged/FileOpenErrorDialog.cs        |   14 +-
 .../Dialog/Unmanaged/FileSaveErrorDialog.cs        |   14 +-
 .../Dialog/Unmanaged/SaveConfirmationDialog.cs     |   40 ++--
 .../Unmanaged/SubtitleFileOpenErrorDialog.cs       |    2 +-
 .../Dialog/Unmanaged/VideoErrorDialog.cs           |    4 +-
 .../Dialog/Unmanaged/WarningDialog.cs              |    2 +-
 src/GnomeSubtitles/Dialog/Util.cs                  |    4 +-
 src/GnomeSubtitles/Dialog/VideoOpenDialog.cs       |   20 +-
 src/GnomeSubtitles/Dialog/VideoSeekToDialog.cs     |    6 +-
 src/GnomeSubtitles/Execution/BugReporter.cs        |   10 +-
 src/GnomeSubtitles/Execution/Executable.cs         |   10 +-
 src/GnomeSubtitles/Execution/ExecutionContext.cs   |   34 ++--
 .../Ui/Component/EncodingComboBox.cs               |   10 +-
 .../Ui/Component/NewlineTypeComboBox.cs            |    4 +-
 .../Ui/Component/SubtitleFormatComboBox.cs         |    2 +-
 src/GnomeSubtitles/Ui/Edit/SubtitleEdit.cs         |   30 ++--
 .../Ui/Edit/SubtitleEditSpinButtons.cs             |   60 +++---
 src/GnomeSubtitles/Ui/Edit/SubtitleEditText.cs     |   26 +-
 src/GnomeSubtitles/Ui/Edit/SubtitleEditTextView.cs |  134 +++++-----
 .../Ui/Edit/SubtitleEditTextViewMargin.cs          |   72 +++---
 .../Ui/Edit/SubtitleEditTranslation.cs             |   28 +-
 src/GnomeSubtitles/Ui/MainUi.cs                    |   82 ++++----
 src/GnomeSubtitles/Ui/Menus.cs                     |  188 ++++++++--------
 src/GnomeSubtitles/Ui/Status.cs                    |    8 +-
 .../Exceptions/PlayerEngineException.cs            |   14 +-
 src/GnomeSubtitles/Ui/VideoPreview/Player.cs       |   66 +++---
 .../Ui/VideoPreview/PlayerPositionWatcher.cs       |   20 +-
 .../Ui/VideoPreview/SubtitleOverlay.cs             |   42 ++--
 .../Ui/VideoPreview/SubtitleTracker.cs             |   36 ++--
 src/GnomeSubtitles/Ui/VideoPreview/Video.cs        |  116 +++++-----
 src/GnomeSubtitles/Ui/VideoPreview/VideoFiles.cs   |   10 +-
 .../Ui/VideoPreview/VideoPosition.cs               |   58 +++---
 .../Ui/View/CellRendererCenteredText.cs            |    6 +-
 src/GnomeSubtitles/Ui/View/SelectionIntended.cs    |    8 +-
 src/GnomeSubtitles/Ui/View/SelectionType.cs        |    4 +-
 src/GnomeSubtitles/Ui/View/SubtitleSelection.cs    |  104 ++++----
 src/GnomeSubtitles/Ui/View/SubtitleView.cs         |  146 ++++++------
 src/GnomeSubtitles/Ui/View/Subtitles.cs            |   52 ++--
 src/GnomeSubtitles/Ui/WidgetNames.cs               |   20 +-
 src/SubLib/Core/Domain/Enumerations.cs             |   58 +++---
 src/SubLib/Core/Domain/FileProperties.cs           |   28 +-
 src/SubLib/Core/Domain/Frames.cs                   |   42 ++--
 src/SubLib/Core/Domain/Headers.cs                  |   78 +++---
 src/SubLib/Core/Domain/IncompleteSubtitle.cs       |   12 +-
 .../Core/Domain/IncompleteSubtitleCollection.cs    |   14 +-
 src/SubLib/Core/Domain/Style.cs                    |   18 +-
 src/SubLib/Core/Domain/Subtitle.cs                 |   84 ++++----
 src/SubLib/Core/Domain/SubtitleCollection.cs       |   36 ++--
 src/SubLib/Core/Domain/SubtitleConstants.cs        |   34 ++--
 src/SubLib/Core/Domain/SubtitleHeaders.cs          |  104 ++++----
 src/SubLib/Core/Domain/SubtitleProperties.cs       |   40 ++--
 src/SubLib/Core/Domain/SubtitleText.cs             |   46 ++--
 src/SubLib/Core/Domain/SubtitleTypeInfo.cs         |   28 +-
 src/SubLib/Core/Domain/Subtitles.cs                |   18 +-
 src/SubLib/Core/Domain/SyncPoint.cs                |    8 +-
 src/SubLib/Core/Domain/SyncPoints.cs               |   30 ++--
 src/SubLib/Core/Domain/Times.cs                    |   32 ++--
 src/SubLib/Core/Domain/Timing.cs                   |   10 +-
 src/SubLib/Core/MatchEvaluationCounter.cs          |    8 +-
 src/SubLib/Core/Search/SearchOperator.cs           |   84 ++++----
 src/SubLib/Core/Search/SubtitleReplaceResult.cs    |    2 +-
 src/SubLib/Core/Search/SubtitleSearchOptions.cs    |   18 +-
 src/SubLib/Core/Search/SubtitleSearchResults.cs    |   10 +-
 src/SubLib/Core/SubtitleFactory.cs                 |   86 ++++----
 src/SubLib/Core/SubtitleSaver.cs                   |   18 +-
 src/SubLib/Core/Timing/AdjustOperator.cs           |   18 +-
 src/SubLib/Core/Timing/FrameRateOperator.cs        |    8 +-
 src/SubLib/Core/Timing/MergeOperator.cs            |   18 +-
 src/SubLib/Core/Timing/ShiftOperator.cs            |   16 +-
 src/SubLib/Core/Timing/SplitOperator.cs            |   26 +-
 src/SubLib/Core/Timing/SyncUtil.cs                 |   22 +-
 src/SubLib/Core/Timing/SynchronizeOperator.cs      |   30 ++--
 src/SubLib/Core/Timing/TimingUtil.cs               |    6 +-
 src/SubLib/Core/Translations.cs                    |   16 +-
 src/SubLib/Core/Translator.cs                      |   46 ++--
 .../Exceptions/EncodingNotSupportedException.cs    |    2 +-
 src/SubLib/Exceptions/FileTooLargeException.cs     |    2 +-
 src/SubLib/Exceptions/TranslatorException.cs       |    2 +-
 src/SubLib/Exceptions/UnknownEncodingException.cs  |    2 +-
 .../Exceptions/UnknownSubtitleFormatException.cs   |    2 +-
 src/SubLib/IO/FileInputOutput.cs                   |   24 +-
 src/SubLib/IO/Input/ParsingProperties.cs           |    6 +-
 src/SubLib/IO/Input/PlainTextParser.cs             |   28 +-
 src/SubLib/IO/Input/SubtitleInput.cs               |   44 ++--
 src/SubLib/IO/Input/SubtitleParser.cs              |  126 +++++-----
 src/SubLib/IO/Output/SubtitleOutput.cs             |   42 ++--
 src/SubLib/IO/Output/VerboseConsole.cs             |    8 +-
 .../IO/SubtitleFormats/BuiltInSubtitleFormats.cs   |   12 +-
 src/SubLib/IO/SubtitleFormats/SubtitleFormat.cs    |   62 +++---
 .../IO/SubtitleFormats/SubtitleFormatAQTitle.cs    |   20 +-
 .../SubtitleFormatAdobeEncoreDVD.cs                |   14 +-
 .../SubtitleFormatAdvancedSubStationAlpha.cs       |   18 +-
 .../SubtitleFormatDKSSubtitleFormat.cs             |   12 +-
 .../SubtitleFormats/SubtitleFormatFABSubtitler.cs  |    8 +-
 .../SubtitleFormatKaraokeLyricsLRC.cs              |   16 +-
 .../SubtitleFormatKaraokeLyricsVKT.cs              |   18 +-
 .../IO/SubtitleFormats/SubtitleFormatMPSub.cs      |   10 +-
 .../IO/SubtitleFormats/SubtitleFormatMPlayer.cs    |   10 +-
 .../IO/SubtitleFormats/SubtitleFormatMPlayer2.cs   |    8 +-
 .../IO/SubtitleFormats/SubtitleFormatMacSUB.cs     |   14 +-
 .../IO/SubtitleFormats/SubtitleFormatMicroDVD.cs   |   16 +-
 .../IO/SubtitleFormats/SubtitleFormatPanimator.cs  |   18 +-
 .../SubtitleFormatPhoenixJapanimationSociety.cs    |   14 +-
 .../IO/SubtitleFormats/SubtitleFormatPowerDivX.cs  |   10 +-
 .../SubtitleFormats/SubtitleFormatSubCreator1x.cs  |    4 +-
 .../IO/SubtitleFormats/SubtitleFormatSubRip.cs     |   12 +-
 .../SubtitleFormatSubStationAlpha.cs               |   32 ++--
 .../IO/SubtitleFormats/SubtitleFormatSubViewer1.cs |   20 +-
 .../IO/SubtitleFormats/SubtitleFormatSubViewer2.cs |   14 +-
 .../SubtitleFormatViPlaySubtitleFile.cs            |   20 +-
 177 files changed, 2819 insertions(+), 2819 deletions(-)
---
diff --git a/src/External/GStreamerPlaybin/Engine.cs b/src/External/GStreamerPlaybin/Engine.cs
index aecb197..c7c1691 100644
--- a/src/External/GStreamerPlaybin/Engine.cs
+++ b/src/External/GStreamerPlaybin/Engine.cs
@@ -29,12 +29,12 @@ using System.Runtime.InteropServices;
 
 namespace GStreamer
 {
-       
+
        #pragma warning disable 649             //Disables warning about fields not being assigned to
-       
+
        // media engine enumerations
        public enum MediaStatus { Playing, Paused, Loaded, Unloaded }
-       
+
        // media engine event handlers
        public delegate void ErrorEventHandler (ErrorEventArgs args);
        public delegate void BufferEventHandler (BufferEventArgs args);
@@ -43,91 +43,91 @@ namespace GStreamer
        public delegate void StateEventHandler (StateEventArgs args);
        public delegate void VideoInfoEventHandler (VideoInfoEventArgs args);
        public delegate void TagEventHandler (TagEventArgs args);
-       
-       
-       
+
+
+
        /// <summary>
        /// The GStreamer Playbin.
        /// </summary>
        public class Playbin
        {
-               
+
                // engine callbacks from the C wrapper
                delegate void eosCallback ();
                delegate void errorCallback (string error, string debug);
                delegate void bufferCallback (int progress);
                delegate void infoCallback (IntPtr ptr);
                delegate void tagCallback (IntPtr ptr);
-               
+
                eosCallback eos_cb;
                errorCallback error_cb;
                bufferCallback buffer_cb;
                infoCallback info_cb;
                tagCallback tag_cb;
-               
-               
+
+
                // declarations
                HandleRef engine;
                MediaStatus status = MediaStatus.Unloaded;
-               
-               
+
+
                /// <summary>Raised when an error occurs.</summary>
                public event ErrorEventHandler Error;
-               
+
                /// <summary>Raised when the buffer status has changed.</summary>
                public event BufferEventHandler Buffer;
-               
+
                /// <summary>Raised when the end of the stream is reached.</summary>
                public event EndOfStreamEventHandler EndOfStream;
-               
+
                /// <summary>Raised when the playbin state changes. ie: Playing, Paused, etc.</summary>
                public event StateEventHandler StateChanged;
-               
+
                /// <summary>Raised when video information is found.</summary>
                public event VideoInfoEventHandler FoundVideoInfo;
-               
+
                /// <summary>Raised when a media tag is found.</summary>
                public event TagEventHandler FoundTag;
-               
-               
-               
+
+
+
                /// <summary>
                /// Load the GStreamer library and attach it
                /// to the specified window.
                /// </summary>
                public bool Initiate (ulong x_window_id)
                {
-                       
+
                        // load the gstreamer library
                        IntPtr ptr = gst_binding_init (x_window_id);
-                       
+
                        if(ptr == IntPtr.Zero)
                        {
                                throwError ("Failed to load the Gstreamer library", "");
                                return false;
                        }
                        else engine = new HandleRef (this, ptr);
-                       
-                       
+
+
                        // set up callbacks
                        eos_cb = new eosCallback (onEos);
                        error_cb = new errorCallback (onError);
                        buffer_cb = new bufferCallback (onBuffer);
                        info_cb = new infoCallback (onInfo);
                        tag_cb = new tagCallback (onTag);
-                       
+
                        gst_binding_set_eos_cb (engine, eos_cb);
                        gst_binding_set_error_cb (engine, error_cb);
                        gst_binding_set_buffer_cb (engine, buffer_cb);
                        gst_binding_set_info_cb (engine, info_cb);
                        gst_binding_set_tag_cb (engine, tag_cb);
-                       
-                       
+
+
                        status = MediaStatus.Unloaded;
                        return true;
                }
-               
-               
+
+
                /// <summary>
                /// Load the GStreamer library.
                /// </summary>
@@ -135,9 +135,9 @@ namespace GStreamer
                {
                        return Initiate (0);
                }
-               
-               
-               
+
+
+
                /// <summary>
                /// Disposes the GStreamer library.
                /// </summary>
@@ -147,7 +147,7 @@ namespace GStreamer
                        gst_binding_deinit (engine);
                        changeState (MediaStatus.Unloaded);
                }
-               
+
                /// <summary>
                /// Loads the specified path into the GStreamer library.
                /// </summary>
@@ -155,15 +155,15 @@ namespace GStreamer
                {
                        if (!isUnloaded)
                                Unload ();
-                       
+
                        bool loaded = gst_binding_load (engine, uri);
-                       
+
             if (loaded)
                 changeState (MediaStatus.Loaded);
-            
+
             return loaded;
                }
-               
+
                /// <summary>
                /// Plays the loaded media file.
                /// </summary>
@@ -175,7 +175,7 @@ namespace GStreamer
                                changeState (MediaStatus.Playing);
                        }
                }
-               
+
                /// <summary>
                /// Pauses the loaded media file.
                /// </summary>
@@ -187,7 +187,7 @@ namespace GStreamer
                                changeState (MediaStatus.Paused);
                        }
                }
-               
+
                /// <summary>
                /// Unloads the media file.
                /// </summary>
@@ -199,7 +199,7 @@ namespace GStreamer
                                changeState (MediaStatus.Unloaded);
                        }
                }
-               
+
                /// <summary>
                /// Changes the window to which video playback is attached to.
                /// </summary>
@@ -207,9 +207,9 @@ namespace GStreamer
                {
                        gst_binding_set_xid (engine, window_id);
                }
-               
-               
-               
+
+
+
                /// <summary>
                /// Seeks to the nearest millisecond on the media file.
                /// </summary>
@@ -217,11 +217,11 @@ namespace GStreamer
                {
                        if (isUnloaded)
                                return;
-                       
+
                        gst_binding_set_position (engine, (ulong) time.TotalMilliseconds, speed);
                }
-               
-               
+
+
                /// <summary>
                /// Seeks to the nearest millisecond on the media file.
                /// </summary>
@@ -230,7 +230,7 @@ namespace GStreamer
                        TimeSpan time = TimeSpan.FromMilliseconds (milliseconds);
                        Seek (time, speed);
                }
-               
+
                /// <summary>
                /// Seeks to the specified track number.
                /// </summary>
@@ -240,10 +240,10 @@ namespace GStreamer
                                return;
                        gst_binding_set_track (engine, (ulong) track_number);
                }
-               
-               
-               
-               
+
+
+
+
                /// <summary>
                /// Returns the current position that the media file is on.
                /// </summary>
@@ -253,13 +253,13 @@ namespace GStreamer
                        {
                                if (isUnloaded)
                                        return TimeSpan.Zero;
-                               
+
                                double pos = (double) gst_binding_get_position (engine);
                                return TimeSpan.FromMilliseconds (pos);
                        }
                }
-               
-               
+
+
                /// <summary>
                /// Returns the total duration of the media file.
                /// </summary>
@@ -268,14 +268,14 @@ namespace GStreamer
                        get{
                                if (isUnloaded)
                                        return TimeSpan.Zero;
-                               
+
                                double dur = (double) gst_binding_get_duration (engine);
                                return TimeSpan.FromMilliseconds (dur);
                        }
                }
-               
-               
-               
+
+
+
                /// <summary>
                /// Returns the current volume of the GStreamer library.
                /// </summary>
@@ -284,9 +284,9 @@ namespace GStreamer
                        get{ return (double) gst_binding_get_volume (engine); }
                        set{ gst_binding_set_volume (engine, (int) value); }
                }
-               
-               
-               
+
+
+
                /// <summary>
                /// Returns a value determining if the media file is a video file.
                /// </summary>
@@ -294,9 +294,9 @@ namespace GStreamer
                {
                        get{ return !isUnloaded ? gst_binding_has_video (engine) : false; }
                }
-               
-               
-               
+
+
+
                /// <summary>
                /// Returns a string array of all the visualisations available
                /// </summary>
@@ -306,20 +306,20 @@ namespace GStreamer
                        {
                                IntPtr ptr = gst_binding_get_visuals_list (engine);
                                GLib.List list = new GLib.List (ptr, typeof (string));
-                               
+
                                string[] array = new string[list.Count];
-                               
+
                                for (int i=0; i<list.Count; i++)
                                        array[i] = (list[i] as string);
-                               
+
                                list.Dispose ();
                                list = null;
-                               
+
                                return array;
                        }
                }
-               
-               
+
+
                /// <summary>
                /// Sets the visualisation
                /// </summary>
@@ -328,9 +328,9 @@ namespace GStreamer
                        set{ gst_binding_set_visual (engine, value); }
                }
 
-               
-               
-               
+
+
+
                /// <summary>
                /// Returns information on the video stream, or null if it's not available
                /// </summary>
@@ -345,9 +345,9 @@ namespace GStreamer
                                        return null;
                        }
                }
-               
-               
-               
+
+
+
                /// <summary>
                /// Returns the tag of the current media file, or null if it's not available
                /// </summary>
@@ -362,11 +362,11 @@ namespace GStreamer
                                        return null;
                        }
                }
-               
-               
-               
-               
-               
+
+
+
+
+
                /// <summary>
                /// Returns the current status of the media engine.
                /// </summary>
@@ -374,49 +374,49 @@ namespace GStreamer
                {
                        get { return status; }
                }
-               
-               
-               
+
+
+
                void changeState (MediaStatus state)
                {
                        status = state;
                        if (StateChanged != null)
                                StateChanged (new StateEventArgs (state));
                }
-               
-               
-               
+
+
+
                // throws an error to the global error handler
                void throwError (string error, string debug)
                {
                if(Error != null)
                                Error (new ErrorEventArgs (error, debug));
                }
-               
-               
+
+
                // an error in the gstreamer pipeline has occured
                void onError (string error, string debug)
                {
                        throwError (error, debug);
                }
-               
-               
+
+
                // the stream has ended
                void onEos ()
                {
                        if (EndOfStream != null)
                                EndOfStream ();
                }
-               
-               
+
+
                // the gstreamer pipeline is being buffered
                void onBuffer (int progress)
                {
                        if (Buffer != null)
                                Buffer (new BufferEventArgs (progress));
                }
-               
-               
+
+
                // media information is available
                void onInfo (IntPtr ptr)
                {
@@ -427,8 +427,8 @@ namespace GStreamer
                                        FoundVideoInfo (new VideoInfoEventArgs (video_info));
                        }
                }
-               
-               
+
+
                // a media tag is available
                void onTag (IntPtr ptr)
                {
@@ -439,9 +439,9 @@ namespace GStreamer
                                        FoundTag (new TagEventArgs (tag));
                        }
                }
-               
-               
-               
+
+
+
                Tag getTag (IntPtr ptr)
                {
                        if (ptr != IntPtr.Zero)
@@ -449,8 +449,8 @@ namespace GStreamer
                        else
                                return null;
                }
-               
-               
+
+
                VideoInfo getVideoInfo (IntPtr ptr)
                {
                        if (ptr != IntPtr.Zero)
@@ -458,9 +458,9 @@ namespace GStreamer
                        else
                                return null;
                }
-        
-               
-               
+
+
+
                // private convenience properties
                bool isPlaying { get{ return status == MediaStatus.Playing; } }
                bool isUnloaded { get{ return status == MediaStatus.Unloaded; } }
@@ -481,8 +481,8 @@ namespace GStreamer
                static extern void gst_binding_unload (HandleRef play);
                [DllImport("gstreamer_playbin")]
                static extern void gst_binding_set_xid (HandleRef play, ulong xid);
-               
-               
+
+
                // engine property functions
                [DllImport("gstreamer_playbin")]
                static extern ulong gst_binding_get_duration (HandleRef play);
@@ -502,8 +502,8 @@ namespace GStreamer
                static extern IntPtr gst_binding_get_video_info (HandleRef play);
                [DllImport("gstreamer_playbin")]
                static extern IntPtr gst_binding_get_tag (HandleRef play);
-               
-               
+
+
                // engine callbacks
                [DllImport("gstreamer_playbin")]
                static extern void gst_binding_set_eos_cb (HandleRef play, eosCallback cb);
@@ -515,34 +515,34 @@ namespace GStreamer
                static extern void gst_binding_set_info_cb (HandleRef play, infoCallback cb);
                [DllImport("gstreamer_playbin")]
                static extern void gst_binding_set_tag_cb (HandleRef play, tagCallback cb);
-               
-               
+
+
                [DllImport("gstreamer_playbin")]
                static extern void gst_binding_set_visual (HandleRef play, string vis_name);
-               
-               
+
+
                [DllImport("gstreamer_playbin")]
                static extern IntPtr gst_binding_get_visuals_list (HandleRef play);
        }
-       
-       
-       
+
+
+
        [StructLayout(LayoutKind.Sequential)]
     public class VideoInfo
     {
        int width;
                int height;
-               float aspect_ratio;     
+               float aspect_ratio;
                float frame_rate;
                bool has_audio;
                bool has_video;
-               
+
                public VideoInfo (IntPtr ptr)
                {
                        if (ptr != IntPtr.Zero)
                                Marshal.PtrToStructure (ptr, this);
                }
-       
+
        public int Width { get{ return width; } }
                public int Height { get{ return height; } }
                public float AspectRatio {
@@ -555,15 +555,15 @@ namespace GStreamer
                }
                public bool HasAudio { get{ return has_audio; } }
                public bool HasVideo { get{ return has_video; } }
-       
+
        public override string ToString ()
        {
                return "width=" + width + ", height=" + height + ", aspect_Ratio=" + aspect_ratio + ", 
frame_rate=" + frame_rate + ", has_audio=" + has_audio + ", has_video=" + has_video;
        }
 
     }
-       
-       
+
+
        [StructLayout(LayoutKind.Sequential)]
     public class Tag
     {
@@ -572,19 +572,19 @@ namespace GStreamer
        int current_track;
                int track_count;
                int duration;
-               
+
                public Tag (IntPtr ptr)
                {
                        if (ptr != IntPtr.Zero)
                                Marshal.PtrToStructure (ptr, this);
                }
-       
+
        public string DiscID { get{ return disc_id; } }
                public string MusicBrainzID { get{ return music_brainz_id; } }
                public int CurrentTrack { get { return current_track; } }
        public int TrackCount { get{ return track_count; } }
                public int Duration { get{ return duration; } }
     }
-       
-       
+
+
 }
diff --git a/src/External/GStreamerPlaybin/Events.cs b/src/External/GStreamerPlaybin/Events.cs
index 3d46829..2e44425 100644
--- a/src/External/GStreamerPlaybin/Events.cs
+++ b/src/External/GStreamerPlaybin/Events.cs
@@ -26,82 +26,82 @@ using System;
 
 namespace GStreamer
 {
-       
+
        /// <summary>
        /// Arguments for a raised error.
        /// </summary>
        public sealed class ErrorEventArgs
        {
                string error, debug;
-               
+
                internal ErrorEventArgs (string error, string debug)
                {
                        this.error = error;
                        this.debug = debug;
                }
-               
+
         public string Error { get{ return error; } }
                public string Debug { get{ return debug; } }
     }
-       
-       
-       
+
+
+
        /// <summary>
        /// Arguments for a raised buffer event.
        /// </summary>
        public sealed class BufferEventArgs
        {
                int progress;
-               
+
                internal BufferEventArgs (int progress)
                { this.progress = progress; }
-               
+
         public int Progress { get{ return progress; } }
     }
-       
-       
-       
+
+
+
        /// <summary>
        /// Arguments for a raised video info event.
        /// </summary>
        public sealed class VideoInfoEventArgs
        {
                VideoInfo video_info;
-               
+
                internal VideoInfoEventArgs (VideoInfo video_info)
                { this.video_info = video_info; }
-               
+
         public VideoInfo VideoInfo { get{ return video_info; } }
     }
-       
-       
-       
+
+
+
        /// <summary>
        /// Arguments for a raised video info event.
        /// </summary>
        public sealed class TagEventArgs
        {
                Tag tag;
-               
+
                internal TagEventArgs (Tag tag)
                { this.tag = tag; }
-               
+
         public Tag Tag { get{ return tag; } }
     }
-       
-    
-       
+
+
+
        /// <summary>
        /// Arguments for a raised state.
        /// </summary>
     public sealed class StateEventArgs
     {
        MediaStatus state;
-               
+
        internal StateEventArgs (MediaStatus state)
        { this.state = state; }
-               
+
        public MediaStatus State { get{ return state; } }
     }
-       
+
 }
\ No newline at end of file
diff --git a/src/GnomeSubtitles/Core/Backup.cs b/src/GnomeSubtitles/Core/Backup.cs
index 0c96641..d3ab63f 100644
--- a/src/GnomeSubtitles/Core/Backup.cs
+++ b/src/GnomeSubtitles/Core/Backup.cs
@@ -29,44 +29,44 @@ namespace GnomeSubtitles.Core {
 
 public class Backup {
        private uint backupTimeoutId = 0; //Active timeout ID, used to remove timeout if needed
-       
+
        public Backup () {
                Base.InitFinished += OnBaseInitFinished;
        }
-       
+
 
        /* Public methods */
-       
+
        /* ReCheck forces restart if we're enabling backup and it's already running */
        public void ReCheck () {
                if (IsBackupRunning()) {
                        Disable();
                }
-       
+
                if (Base.Config.PrefsBackupAutoBackup) {
                        Enable();
                }
        }
-       
-       
+
+
        /* Private members */
-       
+
        private bool IsBackupRunning () {
                return backupTimeoutId != 0;
        }
-       
+
        private void Enable() {
                if (backupTimeoutId == 0)
                        backupTimeoutId = GLib.Timeout.Add((uint)Base.Config.PrefsBackupBackupTime * 1000, 
DoBackup); //milliseconds
        }
-       
+
        private void Disable() {
                if (backupTimeoutId != 0) {
                        GLib.Source.Remove(backupTimeoutId);
                        backupTimeoutId = 0;
                }
        }
-       
+
        private bool DoBackup() {
                if (!Base.IsDocumentLoaded) {
                        return true;
@@ -76,7 +76,7 @@ public class Backup {
                if (Base.Document.CanTextBeSaved) {
                        backupThreadArgs.TextFilePropertiesClone = Base.Document.TextFile.Clone() as 
SubLib.Core.Domain.FileProperties;
                }
-               
+
                if (Base.Document.CanTranslationBeSaved) {
                        backupThreadArgs.TranslationFilePropertiesClone = 
Base.Document.TranslationFile.Clone() as SubLib.Core.Domain.FileProperties;
                }
@@ -89,17 +89,17 @@ public class Backup {
 
                return true;
        }
-       
+
        private void SaveSubtitleFiles (object backupThreadArgs) {
                try {
                        BackupThreadArgs args = backupThreadArgs as BackupThreadArgs;
-                       
+
                        /* Save subtitle file */
                        if ((args.TextFilePropertiesClone != null) && 
(args.TextFilePropertiesClone.SubtitleType != SubtitleType.Unknown) && 
(args.TextFilePropertiesClone.IsPathRooted)) {
                                args.TextFilePropertiesClone.Path += "~";
                                SaveFile(args.SubtitlesClone, args.TextFilePropertiesClone, 
SubtitleTextType.Text);
                        }
-                       
+
                        /* Save translation file */
                        if ((args.TranslationFilePropertiesClone != null) && 
(args.TranslationFilePropertiesClone.SubtitleType != SubtitleType.Unknown) && 
(args.TranslationFilePropertiesClone.IsPathRooted)) {
                                args.TranslationFilePropertiesClone.Path += "~";
@@ -110,7 +110,7 @@ public class Backup {
                        Console.Error.WriteLine("Caught exception creating backup files: " + e);
                }
        }
-       
+
        private bool SaveFile (SubLib.Core.Domain.Subtitles subtitles, FileProperties properties, 
SubtitleTextType textType) {
                try {
                        SubtitleSaver saver = new SubtitleSaver();
@@ -122,16 +122,16 @@ public class Backup {
                        return false;
                }
        }
-       
+
        /* Event members */
-       
+
        private void OnBaseInitFinished () {
                if (Base.Config.PrefsBackupAutoBackup) {
                        Enable();
                }
     }
-    
-    
+
+
     /* Inner classes */
 
     private class BackupThreadArgs {
@@ -145,12 +145,12 @@ public class Backup {
                get { return subtitlesClone; }
                set { this.subtitlesClone = value; }
        }
-       
+
        public SubLib.Core.Domain.FileProperties TextFilePropertiesClone {
                get { return textFilePropertiesClone; }
                set { this.textFilePropertiesClone = value; }
        }
-       
+
        public SubLib.Core.Domain.FileProperties TranslationFilePropertiesClone {
                get { return translationFilePropertiesClone; }
                set { this.translationFilePropertiesClone = value; }
diff --git a/src/GnomeSubtitles/Core/Base.cs b/src/GnomeSubtitles/Core/Base.cs
index 0683d8e..7f8fcb7 100644
--- a/src/GnomeSubtitles/Core/Base.cs
+++ b/src/GnomeSubtitles/Core/Base.cs
@@ -38,7 +38,7 @@ public delegate void BasicEventHandler ();
 
 public class Base {
        private static Glade.XML glade = null;
-       
+
        private static MainUi ui = null;
        private static ExecutionContext executionContext = null;
        private static EventHandlers handlers = null;
@@ -50,7 +50,7 @@ public class Base {
        private static Dialogs dialogs = null;
        private static SpellLanguages spellLanguages = null;
        private static Backup backup = null;
-       
+
        private static Document document = null;
        private static Uri videoUri = null;
        private static TimingMode timingMode = TimingMode.Times;
@@ -64,30 +64,30 @@ public class Base {
        public static event VideoLoadedHandler VideoLoaded;
        public static event BasicEventHandler VideoUnloaded;
        public static event TimingModeChangedHandler TimingModeChanged;
-       
-       
+
+
        /* Public properties */
-       
+
        public static MainUi Ui {
                get { return ui; }
        }
-       
+
        public static ExecutionContext ExecutionContext {
                get { return executionContext; }
        }
-       
+
        public static EventHandlers Handlers {
                get { return handlers; }
        }
-       
+
        public static CommandManager CommandManager {
                get { return commandManager; }
        }
-       
+
        public static Clipboards Clipboards {
                get { return clipboards; }
        }
-       
+
        public static GlobalAccelerators GlobalAccelerators {
                get { return globalAccelerators; }
        }
@@ -95,46 +95,46 @@ public class Base {
        public static DragDrop DragDrop {
                get { return dragDrop; }
        }
-       
+
        public static Config Config {
                get { return config; }
        }
-       
+
        public static Dialogs Dialogs {
                get { return dialogs; }
        }
-       
+
        public static SpellLanguages SpellLanguages {
                get { return spellLanguages; }
        }
-       
+
        public static Backup Backup {
-               get { return backup; }  
+               get { return backup; }
        }
-       
+
        public static Document Document {
                get { return document; }
        }
-       
+
        public static Uri VideoUri {
                get { return videoUri; }
        }
-       
+
        public static bool IsDocumentLoaded {
                get { return document != null; }
        }
-       
+
        public static bool IsVideoLoaded {
                get { return videoUri != null; }
        }
-       
+
        public static TimingMode TimingMode {
                get { return timingMode; }
                set {
                        if (timingMode != value) {
                                timingMode = value;
                                EmitTimingModeChangedEvent();
-                       }               
+                       }
                }
        }
 
@@ -148,126 +148,126 @@ public class Base {
 
 
        /* Public methods */
-       
-       /// <summary>Runs the main GUI, after initialization.</summary> 
+
+       /// <summary>Runs the main GUI, after initialization.</summary>
        public static void Run (ExecutionContext executionContext) {
                Init(executionContext);
-               
+
                ui.Start();
                executionContext.RunApplication();
        }
-       
+
        /// <summary>Quits the program.</summary>
        public static void Quit () {
                ui.Video.Quit();
                executionContext.QuitApplication();
        }
-       
+
        public static void Kill () {
                clipboards.WatchPrimaryChanges = false;
                ui.Kill();
                executionContext.QuitApplication();
        }
-       
+
        public static void NewDocument () {
                if (IsDocumentLoaded)
                        CloseDocument();
-                       
+
                document = new Document();
                EmitDocumentLoadedEvent();
-               
+
                /* Create first subtitle. This happens after EmitDocumentLoadedEvent for all widgets to be 
ready */
                if (document.Subtitles.Count == 0)
                        commandManager.Execute(new InsertFirstSubtitleCommand());
        }
-       
+
        public static void OpenDocument (string path, Encoding encoding) {
                if (IsDocumentLoaded)
                        CloseDocument();
-       
+
                document = new Document(path, encoding);
                TimingMode = document.TextFile.TimingMode;
                EmitDocumentLoadedEvent();
-               
+
                /* Select first subtitle. This happens after EmitDocumentLoadedEvent for all widgets to be 
ready */
                Ui.View.Selection.SelectFirst();
        }
-       
+
        public static void CloseDocument () {
                if (!IsDocumentLoaded)
                        return;
-               
+
                if (document.IsTranslationLoaded)
                        CloseTranslation();
-       
+
                document.Close();
-               CommandManager.Clear();         
+               CommandManager.Clear();
                EmitDocumentUnloadedEvent();
-               
+
                document = null;
        }
-       
+
        public static void OpenVideo (Uri uri) {
                if (uri == null)
                        return;
-       
+
                if (IsVideoLoaded)
                        CloseVideo();
 
                ui.Video.Open(uri);
        }
-       
+
        public static void UpdateFromVideoLoaded (Uri uri) {
                videoUri = uri;
-       
+
                EmitVideoLoadedEvent();
        }
-       
+
        public static void CloseVideo () {
                ui.Video.Close();
                videoUri = null;
-               
+
                EmitVideoUnloadedEvent();
        }
-       
+
        public static void Open (string path, Encoding encoding, Uri videoUri) {
                OpenDocument(path, encoding);
                OpenVideo(videoUri);
        }
-       
+
        public static void OpenTranslation (string path, Encoding encoding) {
                if (document.IsTranslationLoaded)
                        CloseTranslation();
-       
+
                document.OpenTranslation(path, encoding);
                EmitTranslationLoadedEvent();
-               
+
                /* Reselect, for the widgets to update accordingly */
                Ui.View.Selection.Reselect();
        }
-       
+
        public static void NewTranslation () {
                if (document.IsTranslationLoaded)
                        CloseTranslation();
-       
+
                document.NewTranslation();
                EmitTranslationLoadedEvent();
-               
+
                /* Reselect, for the widgets to update accordingly */
                Ui.View.Selection.Reselect();
        }
-       
+
        public static void CloseTranslation () {
                document.CloseTranslation();
                EmitTranslationUnloadedEvent();
        }
-       
+
        public static Widget GetWidget (string name) {
                return glade.GetWidget(name);
        }
 
        /* Private members */
-       
+
        /// <summary>Initializes the base program structure.</summary>
        /// <remarks>Nothing is done if initialization has already occured. The core value is checked for 
this,
        /// if it's null then initialization hasn't occured yet.</remarks>
@@ -277,13 +277,13 @@ public class Base {
 
                executionContext = newExecutionContext;
                executionContext.InitApplication();
-               
+
                /* Initialize Command manager */
                commandManager = new CommandManager();
-               
+
                /* Initialize handlers */
                handlers = new EventHandlers();
-               
+
                /* Initialize misc */
                clipboards = new Clipboards();
                globalAccelerators = new GlobalAccelerators();
@@ -297,47 +297,47 @@ public class Base {
                ui = new MainUi(handlers, out glade);
                clipboards.WatchPrimaryChanges = true;
                Catalog.Init(ExecutionContext.TranslationDomain, ExecutionContext.LocaleDir);
-               
+
                EmitInitFinishedEvent();
        }
-       
+
        /* Event members */
-       
+
        private static void EmitInitFinishedEvent () {
                if (InitFinished != null)
                        InitFinished();
        }
-       
+
        private static void EmitDocumentLoadedEvent () {
                if (DocumentLoaded != null)
                        DocumentLoaded(document);
        }
-       
+
        private static void EmitDocumentUnloadedEvent () {
                if (DocumentUnloaded != null)
                        DocumentUnloaded(document);
        }
-       
+
        private static void EmitTranslationLoadedEvent () {
                if (TranslationLoaded != null)
                        TranslationLoaded();
        }
-       
+
        private static void EmitTranslationUnloadedEvent () {
                if (TranslationUnloaded != null)
                        TranslationUnloaded();
        }
-       
+
        private static void EmitVideoLoadedEvent () {
                if (VideoLoaded != null)
                        VideoLoaded(videoUri);
        }
-       
+
        private static void EmitVideoUnloadedEvent () {
                if (VideoUnloaded != null)
                        VideoUnloaded();
        }
-       
+
        private static void EmitTimingModeChangedEvent () {
                if (TimingModeChanged != null)
                        TimingModeChanged(timingMode);
diff --git a/src/GnomeSubtitles/Core/Clipboards.cs b/src/GnomeSubtitles/Core/Clipboards.cs
index 5da4a80..ce3ebff 100644
--- a/src/GnomeSubtitles/Core/Clipboards.cs
+++ b/src/GnomeSubtitles/Core/Clipboards.cs
@@ -27,14 +27,14 @@ public class Clipboards {
        private Clipboard clipboard = null;
        private Clipboard primary = null;
        private bool watchPrimaryChanges = false;
-       
+
        /// <summary>Initializes a new instance of the <see cref="Clipboards" /> class.</summary>
        /// <remarks><see cref="WatchPrimaryChanges"> is set to false at start, it needs to be enabled 
afterwards.</remarks>
        public Clipboards () {
                clipboard = Clipboard.Get(Gdk.Selection.Clipboard);
                primary = Clipboard.Get(Gdk.Selection.Primary);
        }
-       
+
        public bool WatchPrimaryChanges {
                set {
                        if (value && (!watchPrimaryChanges)) {
@@ -45,7 +45,7 @@ public class Clipboards {
                                primary.OwnerChange -= OnOwnerChange;
                                watchPrimaryChanges = false;
                        }
-               }       
+               }
        }
 
        public void OnOwnerChange (object o, OwnerChangeArgs args) {
@@ -54,17 +54,17 @@ public class Clipboards {
        if ((!window.IsActive) || (args.Event.Owner == 0) || (!ValidWidgetHasFocus()))
                Base.Ui.Menus.SetCutCopySensitivity(false);
        else {
-               Base.Ui.Menus.SetCutCopySensitivity(true);      
+               Base.Ui.Menus.SetCutCopySensitivity(true);
        }
     }
-    
+
     public bool ValidWidgetHasFocus () {
        SpinButton start, end, duration;
        TextView textEdit, translationEdit;
        Base.Ui.Edit.GetEditableWidgets (out start, out end, out duration, out textEdit, out translationEdit);
        return start.HasFocus || end.HasFocus || duration.HasFocus || textEdit.HasFocus || 
translationEdit.HasFocus;
     }
-    
+
     public void Copy () {
        Widget widget = Base.Ui.Window.Focus;
        if (widget is SpinButton)
@@ -72,7 +72,7 @@ public class Clipboards {
        else if (widget is TextView)
                (widget as TextView).Buffer.CopyClipboard(clipboard);
     }
-    
+
     public void Cut () {
                Widget widget = Base.Ui.Window.Focus;
        if (widget is SpinButton)
@@ -80,7 +80,7 @@ public class Clipboards {
        else if (widget is TextView)
                (widget as TextView).Buffer.CutClipboard(clipboard, true);
     }
-    
+
     public void Paste () {
                Widget widget = Base.Ui.Window.Focus;
        if (widget is SpinButton)
diff --git a/src/GnomeSubtitles/Core/Command/AdjustTimingsCommand.cs 
b/src/GnomeSubtitles/Core/Command/AdjustTimingsCommand.cs
index 60e78d3..7ff7432 100644
--- a/src/GnomeSubtitles/Core/Command/AdjustTimingsCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/AdjustTimingsCommand.cs
@@ -35,7 +35,7 @@ public class AdjustTimingsCommand : FixedMultipleSelectionCommand {
                this.lastTime = lastTime;
                useTimes = true;
        }
-       
+
        public AdjustTimingsCommand (int firstFrame, int lastFrame, SelectionIntended selectionIntended) : 
base(description, false, selectionIntended, null, true) {
                this.firstFrame = firstFrame;
                this.lastFrame = lastFrame;
@@ -47,7 +47,7 @@ public class AdjustTimingsCommand : FixedMultipleSelectionCommand {
                        if (ApplyToAll)
                                AdjustAllSubtitlesTime();
                        else
-                               AdjustSubtitlesTime();  
+                               AdjustSubtitlesTime();
                }
                else {
                        if (ApplyToAll)
@@ -60,58 +60,58 @@ public class AdjustTimingsCommand : FixedMultipleSelectionCommand {
 
        private void AdjustAllSubtitlesTime () {
                Subtitles subtitles = Base.Document.Subtitles;
-               
+
                TimeSpan oldFirstTime = subtitles[0].Times.Start;
                TimeSpan oldLastTime = subtitles[subtitles.Count - 1].Times.Start;
-               
+
                AdjustOperator adjustOp = new AdjustOperator(subtitles);
                adjustOp.Adjust(firstTime, lastTime);
-               
+
                firstTime = oldFirstTime;
                lastTime = oldLastTime;
        }
-       
+
        private void AdjustAllSubtitlesFrames () {
                Subtitles subtitles = Base.Document.Subtitles;
-               
+
                int oldFirstFrame = subtitles[0].Frames.Start;
                int oldLastFrame = subtitles[subtitles.Count - 1].Frames.Start;
-               
+
                AdjustOperator adjustOp = new AdjustOperator(subtitles);
                adjustOp.Adjust(firstFrame, lastFrame);
-               
+
                firstFrame = oldFirstFrame;
                lastFrame = oldLastFrame;
        }
-       
+
        private void AdjustSubtitlesTime () {
                Subtitles subtitles = Base.Document.Subtitles;
-               
+
                int firstSubtitle = Util.PathToInt(FirstPath);
                int lastSubtitle = Util.PathToInt(LastPath);
-               
+
                TimeSpan oldFirstTime = subtitles[firstSubtitle].Times.Start;
                TimeSpan oldLastTime = subtitles[lastSubtitle].Times.Start;
-               
+
                AdjustOperator adjustOp = new AdjustOperator(subtitles);
                adjustOp.Adjust(firstSubtitle, firstTime, lastSubtitle, lastTime);
-               
+
                firstTime = oldFirstTime;
                lastTime = oldLastTime;
        }
-       
+
        private void AdjustSubtitlesFrames () {
                Subtitles subtitles = Base.Document.Subtitles;
-               
+
                int firstSubtitle = Util.PathToInt(Paths[0]);
                int lastSubtitle = Util.PathToInt(Paths[Paths.Length - 1]);
-               
+
                int oldFirstFrame = subtitles[firstSubtitle].Frames.Start;
                int oldLastFrame = subtitles[lastSubtitle].Frames.Start;
-               
+
                AdjustOperator adjustOp = new AdjustOperator(subtitles);
                adjustOp.Adjust(firstSubtitle, firstFrame, lastSubtitle, lastFrame);
-               
+
                firstFrame = oldFirstFrame;
                lastFrame = oldLastFrame;
        }
diff --git a/src/GnomeSubtitles/Core/Command/BaseCommand.cs b/src/GnomeSubtitles/Core/Command/BaseCommand.cs
index c374172..64e7497 100644
--- a/src/GnomeSubtitles/Core/Command/BaseCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/BaseCommand.cs
@@ -29,19 +29,19 @@ public abstract class Command {
                this.description = description;
                this.canGroup = canGroup;
        }
-       
+
        public string Description {
                get { return description; }
        }
-       
+
        public bool CanGroup {
                get { return canGroup; }
        }
-       
+
        public bool StopsGrouping {
                get { return stopsGrouping; }
        }
-       
+
        public CommandTarget Target {
                get { return target; }
        }
@@ -51,11 +51,11 @@ public abstract class Command {
        public virtual void Undo () {
                Execute();
        }
-       
+
        public virtual void Redo () {
                Undo();
        }
-       
+
        /// <summary>Whether this command can be grouped with the last command.</summary>
        public virtual bool CanGroupWith (Command command) {
                return false;
@@ -65,21 +65,21 @@ public abstract class Command {
        public virtual Command MergeWith (Command command) {
                return command;
        }
-       
+
        /* Protected members */
-       
+
        protected void SetDescription (string description) {
                this.description = description;
        }
-       
+
        protected void SetStopsGrouping (bool stopsGrouping) {
                this.stopsGrouping = stopsGrouping;
        }
-       
+
        protected void SetCanGroup (bool canGroup) {
                this.canGroup = canGroup;
        }
-       
+
        protected virtual void SetCommandTarget (CommandTarget target) {
                this.target = target;
        }
diff --git a/src/GnomeSubtitles/Core/Command/ChangeFrameRateCommand.cs 
b/src/GnomeSubtitles/Core/Command/ChangeFrameRateCommand.cs
index 3b815da..5da6c58 100644
--- a/src/GnomeSubtitles/Core/Command/ChangeFrameRateCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/ChangeFrameRateCommand.cs
@@ -34,11 +34,11 @@ public abstract class ChangeFrameRateCommand : FixedMultipleSelectionCommand {
                float previousFrameRate = GetFrameRate();
                SetFrameRate(storedFrameRate);
                storedFrameRate = previousFrameRate;
-               
+
                UpdateMenuItem();
                return true;
        }
-       
+
        protected abstract float GetFrameRate ();
        protected abstract void SetFrameRate (float frameRate);
        protected abstract void UpdateMenuItem ();
@@ -49,16 +49,16 @@ public class ChangeInputFrameRateCommand : ChangeFrameRateCommand {
 
        public ChangeInputFrameRateCommand (float frameRate) : base(description, frameRate) {
        }
-       
+
        protected override float GetFrameRate () {
                return Base.Document.Subtitles.Properties.OriginalFrameRate;
        }
-       
+
        protected override void SetFrameRate (float frameRate) {
                FrameRateOperator frameRateOp = new FrameRateOperator(Base.Document.Subtitles);
                frameRateOp.ChangeOriginal(frameRate);
        }
-       
+
        protected override void UpdateMenuItem () {
                Base.Ui.Menus.UpdateActiveInputFrameRateMenuItem(true);
        }
@@ -69,16 +69,16 @@ public class ChangeVideoFrameRateCommand : ChangeFrameRateCommand {
 
        public ChangeVideoFrameRateCommand (float frameRate) : base(description, frameRate) {
        }
-       
+
        protected override float GetFrameRate () {
                return Base.Document.Subtitles.Properties.CurrentFrameRate;
        }
-       
+
        protected override void SetFrameRate (float frameRate) {
                FrameRateOperator frameRateOp = new FrameRateOperator(Base.Document.Subtitles);
                frameRateOp.ChangeCurrent(frameRate);
        }
-       
+
        protected override void UpdateMenuItem () {
                Base.Ui.Menus.UpdateActiveVideoFrameRateMenuItem();
        }
diff --git a/src/GnomeSubtitles/Core/Command/ChangeStyleCommand.cs 
b/src/GnomeSubtitles/Core/Command/ChangeStyleCommand.cs
index 21ed53b..d2c009c 100644
--- a/src/GnomeSubtitles/Core/Command/ChangeStyleCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/ChangeStyleCommand.cs
@@ -30,7 +30,7 @@ public abstract class ChangeStyleCommand : FixedMultipleSelectionCommand {
        public ChangeStyleCommand (string description, bool newStyleValue) : base(description, false, 
SelectionIntended.Simple, null, true) {
                this.styleValue = newStyleValue;
        }
-       
+
        protected override bool ChangeValues () {
                foreach (TreePath path in Paths) {
                        Subtitle subtitle = Base.Document.Subtitles[path];
@@ -41,7 +41,7 @@ public abstract class ChangeStyleCommand : FixedMultipleSelectionCommand {
        }
 
        /* Methods to be extended */
-       
+
        protected abstract void SetStyle (Subtitle subtitle, bool style);
 
        /* Private members */
diff --git a/src/GnomeSubtitles/Core/Command/ChangeTimingCommand.cs 
b/src/GnomeSubtitles/Core/Command/ChangeTimingCommand.cs
index 72413ac..90989c4 100644
--- a/src/GnomeSubtitles/Core/Command/ChangeTimingCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/ChangeTimingCommand.cs
@@ -27,16 +27,16 @@ public abstract class ChangeTimingCommand : FixedSingleSelectionCommand {
        private TimeSpan storedTime;
        private int storedFrames = -1;
        private bool seekAfterChange = false; //TODO put this in upper classes
-       
+
        /* Protected variables */
        protected Subtitle subtitle = null;
-       
+
        public ChangeTimingCommand (int frames, string description, bool seekAfterChange): base(description, 
true, true) {
                this.subtitle = Base.Document.Subtitles[Path];
                this.storedFrames = frames;
                this.seekAfterChange = seekAfterChange;
        }
-       
+
        public ChangeTimingCommand (TimeSpan time, string description, bool seekAfterChange): 
base(description, true, true) {
                this.subtitle = Base.Document.Subtitles[Path];
                this.storedTime = time;
@@ -44,7 +44,7 @@ public abstract class ChangeTimingCommand : FixedSingleSelectionCommand {
        }
 
        public override bool CanGroupWith (Command command) {
-               return (Util.PathsAreEqual(Path, (command as ChangeTimingCommand).Path));       
+               return (Util.PathsAreEqual(Path, (command as ChangeTimingCommand).Path));
        }
 
        protected override bool ChangeValues () {
@@ -58,7 +58,7 @@ public abstract class ChangeTimingCommand : FixedSingleSelectionCommand {
                storedTime = previousTime;
                return true;
        }
-       
+
        protected override void PostProcess () {
                if (this.seekAfterChange) {
                        Base.Ui.Video.SeekToSelection(true);
@@ -75,20 +75,20 @@ public class ChangeStartCommand : ChangeTimingCommand {
 
        public ChangeStartCommand (int frames, bool seekAfterChange): base(frames, description, 
seekAfterChange) {
        }
-       
+
        public ChangeStartCommand (TimeSpan time, bool seekAfterChange): base(time, description, 
seekAfterChange) {
        }
-       
+
        /* Overriden methods */
 
        protected override TimeSpan GetPreviousTime () {
                return subtitle.Times.Start;
        }
-       
+
        protected override void SetTime (TimeSpan storedTime) {
                subtitle.Times.Start = storedTime;
        }
-       
+
        protected override void SetFrames (int storedFrames) {
                subtitle.Frames.Start = storedFrames;
        }
@@ -99,18 +99,18 @@ public class ChangeEndCommand : ChangeTimingCommand {
 
        public ChangeEndCommand (int frames, bool seekAfterChange): base(frames, description, 
seekAfterChange) {
        }
-       
+
        public ChangeEndCommand (TimeSpan time, bool seekAfterChange): base(time, description, 
seekAfterChange) {
        }
 
        protected override TimeSpan GetPreviousTime () {
                return subtitle.Times.End;
        }
-       
+
        protected override void SetTime (TimeSpan storedTime) {
                subtitle.Times.End = storedTime;
        }
-       
+
        protected override void SetFrames (int storedFrames) {
                subtitle.Frames.End = storedFrames;
        }
@@ -121,18 +121,18 @@ public class ChangeDurationCommand : ChangeTimingCommand {
 
        public ChangeDurationCommand (int frames, bool seekAfterChange): base(frames, description, 
seekAfterChange) {
        }
-       
+
        public ChangeDurationCommand (TimeSpan time, bool seekAfterChange): base(time, description, 
seekAfterChange) {
        }
 
        protected override TimeSpan GetPreviousTime () {
                return subtitle.Times.Duration;
        }
-       
+
        protected override void SetTime (TimeSpan storedTime) {
                subtitle.Times.Duration = storedTime;
        }
-       
+
        protected override void SetFrames (int storedFrames) {
                subtitle.Frames.Duration = storedFrames;
        }
diff --git a/src/GnomeSubtitles/Core/Command/CommandActivatedArgs.cs 
b/src/GnomeSubtitles/Core/Command/CommandActivatedArgs.cs
index a96a9f9..d105bc4 100644
--- a/src/GnomeSubtitles/Core/Command/CommandActivatedArgs.cs
+++ b/src/GnomeSubtitles/Core/Command/CommandActivatedArgs.cs
@@ -27,7 +27,7 @@ public class CommandActivatedArgs : EventArgs {
        public CommandActivatedArgs (CommandTarget target) {
                this.target = target;
        }
-       
+
        public CommandTarget Target {
                get { return target; }
        }
diff --git a/src/GnomeSubtitles/Core/Command/CommandManager.cs 
b/src/GnomeSubtitles/Core/Command/CommandManager.cs
index 92309db..84d373e 100644
--- a/src/GnomeSubtitles/Core/Command/CommandManager.cs
+++ b/src/GnomeSubtitles/Core/Command/CommandManager.cs
@@ -29,11 +29,11 @@ public class CommandManager {
        private int undoCount = 0;
        private int redoCount = 0;
        private int iterator = 0;
-       
+
        public event EventHandler UndoToggled;
        public event EventHandler RedoToggled;
        public event CommandActivatedHandler CommandActivated;
-       
+
        #region Constants
        private const int defaultLimit = 50;
        #endregion
@@ -44,27 +44,27 @@ public class CommandManager {
        public CommandManager (int undoLimit) {
                limit = undoLimit;
                commands = new Command[undoLimit];
-               
+
                Base.InitFinished += OnBaseInitFinished;
        }
-       
+
        public void Clear () {
                commands = new Command[limit];
                undoCount = 0;
                redoCount = 0;
                iterator = 0;
        }
-       
+
        /* Public properties */
-       
+
        public bool CanUndo {
                get { return undoCount > 0; }
        }
-       
+
        public bool CanRedo {
                get { return redoCount > 0; }
        }
-       
+
        public string UndoDescription {
                get {
                        if (CanUndo)
@@ -73,7 +73,7 @@ public class CommandManager {
                                return String.Empty;
                }
        }
-       
+
        public string RedoDescription {
                get {
                        if (CanRedo)
@@ -91,16 +91,16 @@ public class CommandManager {
                }
                return completed;
        }
-       
+
        public void Undo () {
                if (CanUndo) {
-                       Command command = GetPreviousCommand(); 
+                       Command command = GetPreviousCommand();
                        command.Undo();
                        ProcessUndo();
                        EmitCommandActivated(command);
                }
        }
-       
+
        public void Redo () {
                if (CanRedo) {
                        Command command = GetNextCommand();
@@ -115,9 +115,9 @@ public class CommandManager {
        private void ProcessExecute (Command command) {
                bool couldUndoBefore = CanUndo;
                bool couldRedoBefore = CanRedo;
-               
+
                ClearRedo();
-               
+
                bool canGroup = false;
                if (CanUndo && command.CanGroup) {
                        Command lastCommand = GetPreviousCommand();
@@ -127,7 +127,7 @@ public class CommandManager {
                                SetPreviousCommand(merged);
                        }
                }
-               
+
                if (!canGroup) {
                        SetNextCommand(command);
                        Next();
@@ -136,107 +136,107 @@ public class CommandManager {
 
                if (!couldUndoBefore)
                        EmitUndoToggled();
-                       
+
                if (couldRedoBefore)
                        EmitRedoToggled();
 
        }
-       
+
        private void ProcessUndo () {
                bool couldRedoBefore = CanRedo;
-       
+
                Previous();
                undoCount = DecrementCount(undoCount);
                redoCount = IncrementCount(redoCount);
-               
+
                if (!CanUndo)
                        EmitUndoToggled();
-               
+
                if (!couldRedoBefore)
                        EmitRedoToggled();
        }
-       
+
        private void ProcessRedo () {
                bool couldUndoBefore = CanUndo;
-       
+
                Next();
                undoCount = IncrementCount(undoCount);
-               redoCount = DecrementCount(redoCount);  
-               
+               redoCount = DecrementCount(redoCount);
+
                if (!CanRedo)
                        EmitRedoToggled();
-                       
+
                if (!couldUndoBefore)
                        EmitUndoToggled();
        }
-       
+
        private void EmitUndoToggled () {
                if (UndoToggled != null)
                        UndoToggled(this, EventArgs.Empty);
        }
-       
+
        private void EmitRedoToggled () {
                if (RedoToggled != null)
                        RedoToggled(this, EventArgs.Empty);
        }
-       
+
        private void EmitCommandActivated (Command command) {
                if (CommandActivated != null) {
                        CommandActivated(this, new CommandActivatedArgs(command.Target));
                }
        }
-       
+
        private Command GetNextCommand () {
                return commands[iterator];
        }
-       
+
        private Command GetPreviousCommand () {
                if (iterator == 0)
                        return commands[limit - 1];
                else
                        return commands[iterator - 1];
        }
-       
+
        private void SetNextCommand (Command command) {
                commands[iterator] = command;
        }
-       
+
        private void SetPreviousCommand (Command command) {
                if (iterator == 0)
                        commands[limit - 1] = command;
                else
                        commands[iterator - 1] = command;
        }
-       
+
        private void Next () {
                if (iterator == (limit - 1))
                        iterator = 0;
                else
                        iterator++;
        }
-       
+
        private void Previous () {
                if (iterator == 0)
                        iterator = (limit - 1);
                else
-                       iterator--;     
+                       iterator--;
        }
-       
+
        private int IncrementCount (int count) {
                if (count < limit)
                        return count + 1;
                else
                        return count;
        }
-       
+
        private int DecrementCount (int count) {
                return count - 1;
        }
-       
+
        private void ClearRedo () {
                redoCount = 0;
        }
-       
+
        private void ClearTarget (CommandTarget target) {
 
                /* Create new collection of commands */
@@ -244,13 +244,13 @@ public class CommandManager {
                int newIterator = 0;
                int newUndoCount = 0;
                int newRedoCount = 0;
-               
+
                /* Go through the undo commands */
                if (undoCount > 0) {
                        int lastUndoIter = iterator - undoCount;
                        if (lastUndoIter < 0)
                                lastUndoIter = limit + lastUndoIter;
-       
+
                        int undoIter = lastUndoIter;
                        while (undoIter != iterator) {
                                Command undoCommand = commands[undoIter];
@@ -258,11 +258,11 @@ public class CommandManager {
                                        newCommands[newIterator] = undoCommand;
                                        newIterator++;
                                        newUndoCount++;
-                               }               
+                               }
                                undoIter = (undoIter == limit - 1 ? 0 : undoIter + 1);
                        }
                }
-               
+
                /* Go through the redo commands */
                if (redoCount > 0) {
                        int redoIter = iterator;
@@ -272,35 +272,35 @@ public class CommandManager {
                                if (redoCommand.Target != target) {
                                        newCommands[newRedoIterator] = redoCommand;
                                        newRedoIterator++;
-                                       newRedoCount++;                         
-                               }                       
+                                       newRedoCount++;
+                               }
                                redoIter = (redoIter == limit - 1 ? 0 : redoIter + 1);
                        }
                }
-               
+
                /* Check whether to toggle undo and redo */
                bool toToggleUndo = ((undoCount > 0) && (newUndoCount == 0));
                bool toToggleRedo = ((redoCount > 0) && (newRedoCount == 0));
-               
+
                /* Update state */
                commands = newCommands;
                undoCount = newUndoCount;
                redoCount = newRedoCount;
                iterator = newIterator;
-               
+
                /* Issue possible events */
                if (toToggleUndo)
                        EmitUndoToggled();
                if (toToggleRedo)
                        EmitRedoToggled();
        }
-       
+
        /* Event members */
-       
+
        private void OnBaseInitFinished () {
                Base.TranslationUnloaded += OnBaseTranslationUnloaded;
        }
-       
+
        private void OnBaseTranslationUnloaded () {
                ClearTarget(CommandTarget.Translation);
        }
diff --git a/src/GnomeSubtitles/Core/Command/CommandTarget.cs 
b/src/GnomeSubtitles/Core/Command/CommandTarget.cs
index 5aae362..54471fa 100644
--- a/src/GnomeSubtitles/Core/Command/CommandTarget.cs
+++ b/src/GnomeSubtitles/Core/Command/CommandTarget.cs
@@ -26,7 +26,7 @@ public enum CommandTarget {
 
        /// <summary>The command target is the normal document.</summary>
        Normal,
-       
+
        /// <summary>The command target is the translation.</summary>
        Translation,
 
diff --git a/src/GnomeSubtitles/Core/Command/DeleteSubtitlesCommand.cs 
b/src/GnomeSubtitles/Core/Command/DeleteSubtitlesCommand.cs
index ce7a82e..054e70a 100644
--- a/src/GnomeSubtitles/Core/Command/DeleteSubtitlesCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/DeleteSubtitlesCommand.cs
@@ -27,25 +27,25 @@ namespace GnomeSubtitles.Core.Command {
 public class DeleteSubtitlesCommand : MultipleSelectionCommand {
        private static string description = Catalog.GetString("Deleting Subtitles");
        private Subtitle[] subtitles = null;
-       
+
        public DeleteSubtitlesCommand () : base(description, false, SelectionIntended.Simple, null) {
                StoreSubtitles(); //TODO move to Execute
        }
 
-       
+
        public override bool Execute () {
                Base.Ui.View.Remove(Paths);
                return true;
        }
-       
+
        public override void Undo () {
-               Base.Ui.View.Insert(subtitles, Paths, Focus);   
+               Base.Ui.View.Insert(subtitles, Paths, Focus);
        }
-       
+
        public override void Redo () {
                Execute();
        }
-               
+
        /* Private members */
 
        private void StoreSubtitles () {
@@ -54,7 +54,7 @@ public class DeleteSubtitlesCommand : MultipleSelectionCommand {
                for (int index = 0 ; index < count ; index++) {
                        TreePath path = Paths[index];
                        subtitles[index] = Base.Document.Subtitles[path];
-               }       
+               }
        }
 
 }
diff --git a/src/GnomeSubtitles/Core/Command/DeleteTextCommand.cs 
b/src/GnomeSubtitles/Core/Command/DeleteTextCommand.cs
index a09ca0a..dc7de25 100644
--- a/src/GnomeSubtitles/Core/Command/DeleteTextCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/DeleteTextCommand.cs
@@ -28,7 +28,7 @@ public class DeleteTextCommand : DeleteTextContentCommand {
 
        public DeleteTextCommand (int index, string text, int cursor) : base(description, index, text, 
cursor) {
        }
-       
+
        protected override SubtitleEditTextView GetTextView () {
                return Base.Ui.Edit.TextEdit;
        }
diff --git a/src/GnomeSubtitles/Core/Command/DeleteTextContentCommand.cs 
b/src/GnomeSubtitles/Core/Command/DeleteTextContentCommand.cs
index 85931b4..4af6456 100644
--- a/src/GnomeSubtitles/Core/Command/DeleteTextContentCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/DeleteTextContentCommand.cs
@@ -32,16 +32,16 @@ public abstract class DeleteTextContentCommand : FixedSingleSelectionCommand {
        public DeleteTextContentCommand (string description, int index, string text, int cursor) : 
base(description, true, false) {
                this.index = index;
                this.text = text;
-               toRight = (cursor == index);            
-               
+               toRight = (cursor == index);
+
                /* If text isn't a single char, do not group */
                if (text.Length != 1)
                        SetStopsGrouping(true);
        }
-       
+
        /* Abstract members */
        protected abstract SubtitleEditTextView GetTextView ();
-       
+
        /* Public members */
 
        public override bool CanGroupWith (Command command) {
@@ -54,45 +54,45 @@ public abstract class DeleteTextContentCommand : FixedSingleSelectionCommand {
                        && ((this.toRight && (!(Char.IsWhiteSpace(last.GetLastChar()) && 
(!Char.IsWhiteSpace(GetLastChar()))))) //A space->non-space sequence is not the case
                                || ((!this.toRight) && (!(Char.IsWhiteSpace(last.GetFirstChar()) && 
(!Char.IsWhiteSpace(GetLastChar()))))));
        }
-       
+
        public override Command MergeWith (Command command) {
                DeleteTextContentCommand last = command as DeleteTextContentCommand;
                if (this.toRight)
                        this.text = last.GetText() + this.text;
                else
-                       this.text = this.text + last.GetText();         
+                       this.text = this.text + last.GetText();
 
                return this;
        }
-       
+
        public override void Undo () {
                Base.Ui.View.Selection.Select(Path, true, false);
                SubtitleEditTextView textView = GetTextView();
                textView.InsertText(index, text);
                PostProcess();
        }
-       
+
        public override void Redo () {
                Base.Ui.View.Selection.Select(Path, true, false);
                SubtitleEditTextView textView = GetTextView();
                textView.DeleteText(index, index + text.Length);
                PostProcess();
        }
-       
+
        /* Protected members */
-       
+
        protected override void PostProcess () {
                Base.Ui.View.RedrawPath(Path);
        }
-       
+
        protected int GetIndex () {
                return index;
        }
-       
+
        protected string GetText () {
                return text;
        }
-       
+
        protected bool GetToRight () {
                return toRight;
        }
@@ -100,7 +100,7 @@ public abstract class DeleteTextContentCommand : FixedSingleSelectionCommand {
        protected char GetFirstChar () {
                return text[0];
        }
-       
+
        protected char GetLastChar () {
                return text[text.Length - 1];
        }
diff --git a/src/GnomeSubtitles/Core/Command/DeleteTranslationCommand.cs 
b/src/GnomeSubtitles/Core/Command/DeleteTranslationCommand.cs
index a72588e..bc05d3d 100644
--- a/src/GnomeSubtitles/Core/Command/DeleteTranslationCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/DeleteTranslationCommand.cs
@@ -29,7 +29,7 @@ public class DeleteTranslationCommand : DeleteTextContentCommand {
        public DeleteTranslationCommand (int index, string text, int cursor) : base(description, index, text, 
cursor) {
                SetCommandTarget(CommandTarget.Translation);
        }
-       
+
        protected override SubtitleEditTextView GetTextView () {
                return Base.Ui.Edit.TranslationEdit;
        }
diff --git a/src/GnomeSubtitles/Core/Command/FixedMultipleSelectionCommand.cs 
b/src/GnomeSubtitles/Core/Command/FixedMultipleSelectionCommand.cs
index 49d5ea2..94dd76a 100644
--- a/src/GnomeSubtitles/Core/Command/FixedMultipleSelectionCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/FixedMultipleSelectionCommand.cs
@@ -25,7 +25,7 @@ namespace GnomeSubtitles.Core.Command {
 /// <summary>Represents a <see cref="Command" /> in which the selection never changes during 
execution/undo/redo.</summary>
 public abstract class FixedMultipleSelectionCommand : MultipleSelectionCommand {
        private bool reselect = false;
-       
+
        /// <summary>Creates a new instance of the <see cref="MultipleFixedSelectionCommand" /> 
class.</summary>
        /// <param name="description">The description of the command.</param>
        /// <param name="canGroup">Whether to possibly group the command with the previous command.</param>
@@ -33,22 +33,22 @@ public abstract class FixedMultipleSelectionCommand : MultipleSelectionCommand {
        /// <param name="paths">The paths to select, or null to use auto selection.</param>
        /// <param name="reselect">Whether to reselect the command when executing. Note that this doesn't 
apply to Undo nor to Redo.</param>
        public FixedMultipleSelectionCommand (string description, bool canGroup, SelectionIntended 
selectionIntended, TreePath[] paths, bool reselect) : base(description, canGroup, selectionIntended, paths) {
-               this.reselect = reselect;               
+               this.reselect = reselect;
        }
-       
+
        /* Protected properties */
-       
+
        /// <summary>Whether to reselect the subtitles when the command is executed.</summary>
        /// <remarks>Subtitles aren't really reselected, the GUI is called to be updated based on the 
selection, as if subtitles had been reselected.</remarks>
        protected bool Reselect {
                get { return reselect; }
        }
-       
+
        public override bool Execute () {
                bool completed = ChangeValues();
                if (!completed)
                        return false;
-               
+
                switch (SelectionType) {
                        case SelectionType.All:
                                Base.Ui.View.Selection.SelectAll();
@@ -63,11 +63,11 @@ public abstract class FixedMultipleSelectionCommand : MultipleSelectionCommand {
                Base.Ui.View.Refresh();
                if (reselect)
                        Base.Ui.View.Selection.Reselect();
-               
+
                PostProcess();
                return true;
        }
-       
+
        public override void Undo () {
                ChangeValues();
 
@@ -90,13 +90,13 @@ public abstract class FixedMultipleSelectionCommand : MultipleSelectionCommand {
        public override void Redo () {
                Undo();
        }
-       
+
        /* Methods to be extended */
-       
+
        protected virtual bool ChangeValues () {
                return true;
        }
-       
+
        protected virtual void PostProcess () {
                return;
        }
diff --git a/src/GnomeSubtitles/Core/Command/FixedSingleSelectionCommand.cs 
b/src/GnomeSubtitles/Core/Command/FixedSingleSelectionCommand.cs
index ccbe4d7..d88acc5 100644
--- a/src/GnomeSubtitles/Core/Command/FixedSingleSelectionCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/FixedSingleSelectionCommand.cs
@@ -23,7 +23,7 @@ namespace GnomeSubtitles.Core.Command {
 
 public abstract class FixedSingleSelectionCommand : SingleSelectionCommand {
        private bool reselect = false;
-       
+
        public FixedSingleSelectionCommand (string description, bool canGroup, bool reselect) : 
base(description, canGroup) {
                this.reselect = reselect;
        }
@@ -32,14 +32,14 @@ public abstract class FixedSingleSelectionCommand : SingleSelectionCommand {
                bool completed = ChangeValues();
                if (!completed)
                        return false;
-               
+
                if (reselect)
                        Base.Ui.View.Selection.Select(Path, true, true);
                else {
                        Base.Ui.View.Selection.ScrollToFocus(Path, true);
                        Base.Ui.View.Refresh();
                }
-               
+
                PostProcess();
                return true;
        }
@@ -49,13 +49,13 @@ public abstract class FixedSingleSelectionCommand : SingleSelectionCommand {
                Base.Ui.View.Selection.Select(Path, true, true);
                PostProcess();
        }
-       
+
        /* Methods to be extended */
-       
+
        protected virtual bool ChangeValues () {
                return true;
        }
-       
+
        protected virtual void PostProcess () {
                return;
        }
diff --git a/src/GnomeSubtitles/Core/Command/InsertSubtitleCommand.cs 
b/src/GnomeSubtitles/Core/Command/InsertSubtitleCommand.cs
index 6eb2501..2ed9b64 100644
--- a/src/GnomeSubtitles/Core/Command/InsertSubtitleCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/InsertSubtitleCommand.cs
@@ -32,13 +32,13 @@ public abstract class InsertSubtitleCommand : SingleSelectionCommand {
        public InsertSubtitleCommand (TreePath path) : base(description, false, path) {
                newPath = GetNewPath();
        }
-       
+
        /* Protected properties */
-       
+
        protected TreePath NewPath {
                get { return newPath; }
        }
-       
+
        /* Public members */
 
        public override bool Execute () {
@@ -46,7 +46,7 @@ public abstract class InsertSubtitleCommand : SingleSelectionCommand {
                subtitle = Base.Document.Subtitles[newPath];
                return true;
        }
-       
+
        public override void Undo () {
                bool selectNext = ((Path != null) && (Path.Compare(newPath) == 1));
                Base.Ui.View.Remove(newPath, selectNext);
@@ -55,9 +55,9 @@ public abstract class InsertSubtitleCommand : SingleSelectionCommand {
        public override void Redo () {
                Base.Ui.View.Insert(subtitle, newPath);
        }
-       
+
        /* Methods to be extended */
-       
+
        protected abstract TreePath GetNewPath ();
        protected abstract void InsertNew ();
 
@@ -67,11 +67,11 @@ public class InsertSubtitleAfterCommand : InsertSubtitleCommand {
 
        public InsertSubtitleAfterCommand () : base(Base.Ui.View.Selection.LastPath) {
        }
-       
+
        protected override TreePath GetNewPath () {
                return Util.PathNext(Path);
        }
-       
+
        protected override void InsertNew () {
                Base.Ui.View.InsertNewAfter(Path);
        }
@@ -86,22 +86,22 @@ public class InsertSubtitleBeforeCommand : InsertSubtitleCommand {
        protected override TreePath GetNewPath () {
                return Path;
        }
-       
+
        protected override void InsertNew () {
                Base.Ui.View.InsertNewBefore(Path);
        }
 
 }
- 
+
 public class InsertFirstSubtitleCommand : InsertSubtitleCommand {
-       
+
        public InsertFirstSubtitleCommand () : base(null) {
        }
-       
+
        protected override TreePath GetNewPath () {
                return TreePath.NewFirst();
        }
-       
+
        protected override void InsertNew () {
                Base.Ui.View.InsertNewAt(NewPath);
        }
@@ -109,14 +109,14 @@ public class InsertFirstSubtitleCommand : InsertSubtitleCommand {
 }
 
 public class InsertLastSubtitleCommand : InsertSubtitleCommand {
-       
+
        public InsertLastSubtitleCommand () : base(Util.IntToPath(Base.Document.Subtitles.Count - 1)) {
        }
-       
+
        protected override TreePath GetNewPath () {
                return Util.IntToPath(Base.Document.Subtitles.Count);
        }
-       
+
        protected override void InsertNew () {
                Base.Ui.View.InsertNewAfter(Path);
        }
@@ -134,10 +134,10 @@ public class InsertSubtitleAtVideoPositionCommand : InsertSubtitleCommand {
                if (Base.Ui.Video.IsStatePlaying && Base.Config.PrefsVideoApplyReactionDelay) {
                        subtitleTime -= TimeSpan.FromMilliseconds(Base.Config.PrefsVideoReactionDelay);
                }
-       
+
                if (Base.Document.Subtitles.Count == 0)
                        return TreePath.NewFirst();
-                       
+
                int index = Base.Ui.Video.Tracker.FindSubtitleNearPosition(subtitleTime);
                Subtitle nearestSubtitle = Base.Document.Subtitles[index];
                if (subtitleTime < nearestSubtitle.Times.Start)
diff --git a/src/GnomeSubtitles/Core/Command/InsertTextCommand.cs 
b/src/GnomeSubtitles/Core/Command/InsertTextCommand.cs
index 2367f06..cef2842 100644
--- a/src/GnomeSubtitles/Core/Command/InsertTextCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/InsertTextCommand.cs
@@ -28,7 +28,7 @@ public class InsertTextCommand : InsertTextContentCommand {
 
        public InsertTextCommand (int index, string text) : base(description, index, text) {
        }
-       
+
        protected override SubtitleEditTextView GetTextView () {
                return Base.Ui.Edit.TextEdit;
        }
diff --git a/src/GnomeSubtitles/Core/Command/InsertTextContentCommand.cs 
b/src/GnomeSubtitles/Core/Command/InsertTextContentCommand.cs
index 6ca4821..4d96e45 100644
--- a/src/GnomeSubtitles/Core/Command/InsertTextContentCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/InsertTextContentCommand.cs
@@ -31,15 +31,15 @@ public abstract class InsertTextContentCommand : FixedSingleSelectionCommand {
        public InsertTextContentCommand (string description, int index, string text) : base(description, 
true, false) {
                this.index = index;
                this.text = text;
-               
+
                /* If text isn't a single char, it should have been pasted, so stop grouping */
                if (text.Length != 1)
                        SetStopsGrouping(true);
        }
-       
+
        /* Abstract members */
        protected abstract SubtitleEditTextView GetTextView ();
-       
+
        /* Public members */
 
        public override bool CanGroupWith (Command command) {
@@ -50,42 +50,42 @@ public abstract class InsertTextContentCommand : FixedSingleSelectionCommand {
                        && (this.text.Length == 1) //A single char was inserted
                        && (!(Char.IsWhiteSpace(last.GetLastChar()) && (!Char.IsWhiteSpace(GetLastChar())))); 
//A space->non-space sequence is not the case
        }
-       
+
        public override Command MergeWith (Command command) {
                InsertTextContentCommand last = command as InsertTextContentCommand;
                this.index = last.GetIndex();
-               this.text = last.GetText() + this.text; 
+               this.text = last.GetText() + this.text;
                return this;
        }
-       
+
        public override void Undo () {
                Base.Ui.View.Selection.Select(Path, true, false);
                SubtitleEditTextView textView = GetTextView();
                textView.DeleteText(index, index + text.Length);
                PostProcess();
        }
-       
+
        public override void Redo () {
                Base.Ui.View.Selection.Select(Path, true, false);
                SubtitleEditTextView textView = GetTextView();
                textView.InsertText(index, text);
                PostProcess();
        }
-       
+
        /* Protected members */
-       
+
        protected override void PostProcess () {
                Base.Ui.View.RedrawPath(Path);
        }
-       
+
        protected int GetIndex () {
                return index;
        }
-       
+
        protected string GetText () {
                return text;
        }
-       
+
        protected char GetLastChar () {
                return text[text.Length - 1];
        }
diff --git a/src/GnomeSubtitles/Core/Command/InsertTranslationCommand.cs 
b/src/GnomeSubtitles/Core/Command/InsertTranslationCommand.cs
index ef6bf2a..11809a1 100644
--- a/src/GnomeSubtitles/Core/Command/InsertTranslationCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/InsertTranslationCommand.cs
@@ -29,7 +29,7 @@ public class InsertTranslationCommand : InsertTextContentCommand {
        public InsertTranslationCommand (int index, string text) : base(description, index, text) {
                SetCommandTarget(CommandTarget.Translation);
        }
-       
+
        protected override SubtitleEditTextView GetTextView () {
                return Base.Ui.Edit.TranslationEdit;
        }
diff --git a/src/GnomeSubtitles/Core/Command/MergeSubtitlesCommand.cs 
b/src/GnomeSubtitles/Core/Command/MergeSubtitlesCommand.cs
index d906e6a..1b0a884 100644
--- a/src/GnomeSubtitles/Core/Command/MergeSubtitlesCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/MergeSubtitlesCommand.cs
@@ -30,7 +30,7 @@ public class MergeSubtitlesCommand : MultipleSelectionCommand {
        private static string description = Catalog.GetString("Merging subtitles");
        private Subtitle[] subtitlesBefore = null;
        private Subtitle subtitleAfter = null;
-       
+
        public MergeSubtitlesCommand () : base(description, false, SelectionIntended.Range, null) {
        }
 
@@ -38,7 +38,7 @@ public class MergeSubtitlesCommand : MultipleSelectionCommand {
                GnomeSubtitles.Ui.View.Subtitles subtitles = Base.Document.Subtitles;
                int firstPathInt = Util.PathToInt(this.FirstPath);
                int lastPathInt = Util.PathToInt(this.LastPath);
-               
+
                /* Store selected subtitles */
                int subtitleCount = lastPathInt - firstPathInt + 1;
                this.subtitlesBefore = new Subtitle[subtitleCount];
@@ -46,7 +46,7 @@ public class MergeSubtitlesCommand : MultipleSelectionCommand {
                for (int index = 1, currentPath = firstPathInt + 1 ; index < subtitleCount ; index++, 
currentPath++) {
                        this.subtitlesBefore[index] = subtitles[currentPath];
                }
-               
+
                /* Merge subtitles */
                MergeOperator mergeOperator = new MergeOperator(Base.Document.Subtitles);
                if (!mergeOperator.Merge(firstPathInt, lastPathInt))
@@ -60,11 +60,11 @@ public class MergeSubtitlesCommand : MultipleSelectionCommand {
                        return true;
                }
        }
-       
+
        public override void Undo () {
                if (this.subtitleAfter == null) {
                        this.subtitleAfter = Base.Document.Subtitles[this.FirstPath];
-               }               
+               }
                Base.Document.Subtitles.Remove(this.FirstPath);
                Base.Ui.View.Insert(this.subtitlesBefore, this.FirstPath, this.FirstPath);
                PostProcess();
@@ -75,9 +75,9 @@ public class MergeSubtitlesCommand : MultipleSelectionCommand {
                Base.Ui.View.Insert(this.subtitleAfter, this.FirstPath);
                PostProcess();
        }
-       
+
        /* Protected members */
-       
+
        protected void PostProcess () {
                Base.Ui.Video.SeekToSelection(true);
        }
diff --git a/src/GnomeSubtitles/Core/Command/MultipleSelectionCommand.cs 
b/src/GnomeSubtitles/Core/Command/MultipleSelectionCommand.cs
index 302f3a4..93f7fbc 100644
--- a/src/GnomeSubtitles/Core/Command/MultipleSelectionCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/MultipleSelectionCommand.cs
@@ -26,11 +26,11 @@ public abstract class MultipleSelectionCommand : Command {
        private TreePath[] paths = null;
        private TreePath focus = null;
        private SelectionType selectionType;
-       
-       
+
+
        public MultipleSelectionCommand (string description, bool canGroup, SelectionIntended 
selectionIntended, TreePath[] paths) : this(description, canGroup, selectionIntended, paths, true) {
        }
-       
+
        /// <summary>Base constructor for classes that inherit <see cref="MultipleSelectionCommand" 
/>.</summary>
        /// <param name="description">The description of the command.</param>
        /// <param name="canGroup">Whether to possibly group the command with the previous command.</param>
@@ -66,22 +66,22 @@ public abstract class MultipleSelectionCommand : Command {
 
                this.selectionType = GetSelectionType(selectionIntended);
        }
-       
+
        /* Protected properties */
-       
+
        protected TreePath[] Paths {
                get { return paths; }
                set { paths = value; }
        }
-       
+
        protected TreePath FirstPath {
                get { return paths[0]; }
        }
-       
+
        protected TreePath LastPath {
                get { return paths[paths.Length - 1]; }
        }
-       
+
        protected TreePath Focus {
                get { return focus; }
                set { focus = value; }
@@ -105,9 +105,9 @@ public abstract class MultipleSelectionCommand : Command {
        protected bool ApplyToSimple {
                get { return selectionType == SelectionType.Simple; }
        }
-       
+
        /* Private methods */
-       
+
        private SelectionType GetSelectionType (SelectionIntended selectionIntended) {
                switch (selectionIntended) {
                        case SelectionIntended.All:
@@ -122,7 +122,7 @@ public abstract class MultipleSelectionCommand : Command {
                                return SelectionType.Range;
                        default:
                                return SelectionType.Simple;
-               }       
+               }
        }
 
 }
diff --git a/src/GnomeSubtitles/Core/Command/ReplaceAllCommand.cs 
b/src/GnomeSubtitles/Core/Command/ReplaceAllCommand.cs
index abf6b27..09f0fec 100644
--- a/src/GnomeSubtitles/Core/Command/ReplaceAllCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/ReplaceAllCommand.cs
@@ -55,12 +55,12 @@ public class ReplaceAllCommand : MultipleSelectionCommand {
                Paths = paths;
                if (Paths.Length > 0)
                        Focus = Paths[0];
-               
+
                Base.Ui.View.Selection.Select(Paths, Focus, true);
                return true;
        }
 
-       
+
        public override void Undo () {
                ArrayList newReplacedSubtitles = new ArrayList();
 
@@ -86,7 +86,7 @@ public class ReplaceAllCommand : MultipleSelectionCommand {
                replacedSubtitles = newReplacedSubtitles;
                Base.Ui.View.Selection.Select(Paths, Focus, true);
        }
-       
+
        public override void Redo () {
                Undo();
        }
@@ -95,10 +95,10 @@ public class ReplaceAllCommand : MultipleSelectionCommand {
 
 
        private void GetCommandData (out TreePath[] paths, out CommandTarget target) {
-               ArrayList foundPaths = new ArrayList();         
+               ArrayList foundPaths = new ArrayList();
                bool foundText = false;
                bool foundTranslation = false;
-               
+
                foreach (SubtitleReplaceResult replacedSubtitle in replacedSubtitles) {
                        foundPaths.Add(Util.IntToPath(replacedSubtitle.Number));
 
diff --git a/src/GnomeSubtitles/Core/Command/ShiftTimingsCommand.cs 
b/src/GnomeSubtitles/Core/Command/ShiftTimingsCommand.cs
index 070fa92..b434854 100644
--- a/src/GnomeSubtitles/Core/Command/ShiftTimingsCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/ShiftTimingsCommand.cs
@@ -36,7 +36,7 @@ public class ShiftTimingsCommand : FixedMultipleSelectionCommand {
                this.time = time;
                useTimes = true;
        }
-       
+
        public ShiftTimingsCommand (int frames, SelectionIntended selectionIntended) : base(description, 
false, selectionIntended, null, true) {
                this.frames = frames;
                useTimes = false;
@@ -61,11 +61,11 @@ public class ShiftTimingsCommand : FixedMultipleSelectionCommand {
                }
                return true;
        }
-       
+
        protected override void PostProcess () {
                Base.Ui.Video.SeekToSelection(true);
        }
-       
+
        /* Private Members */
 
        private void ShiftTimesAll () {
@@ -73,13 +73,13 @@ public class ShiftTimingsCommand : FixedMultipleSelectionCommand {
                shiftOp.Shift(time);
                time = time.Negate();
        }
-       
+
        private void ShiftFramesAll () {
                ShiftOperator shiftOp = new ShiftOperator(Base.Document.Subtitles);
                shiftOp.Shift(frames);
                frames = -frames;
        }
-       
+
        private void ShiftTimesSimple () {
                foreach (TreePath path in Paths) {
                        Subtitle subtitle = Base.Document.Subtitles[path];
@@ -95,20 +95,20 @@ public class ShiftTimingsCommand : FixedMultipleSelectionCommand {
                }
                frames = -frames;
        }
-       
+
        private void ShiftTimesRange () {
                int firstSubtitle = Util.PathToInt(FirstPath);
                int lastSubtitle = Util.PathToInt(LastPath);
-               
+
                ShiftOperator shiftOp = new ShiftOperator(Base.Document.Subtitles);
                shiftOp.Shift(time, firstSubtitle, lastSubtitle);
                time = time.Negate();
        }
-       
+
        private void ShiftFramesRange () {
                int firstSubtitle = Util.PathToInt(FirstPath);
                int lastSubtitle = Util.PathToInt(LastPath);
-               
+
                ShiftOperator shiftOp = new ShiftOperator(Base.Document.Subtitles);
                shiftOp.Shift(frames, firstSubtitle, lastSubtitle);
                frames = -frames;
diff --git a/src/GnomeSubtitles/Core/Command/SingleSelectionCommand.cs 
b/src/GnomeSubtitles/Core/Command/SingleSelectionCommand.cs
index f2766a7..751205a 100644
--- a/src/GnomeSubtitles/Core/Command/SingleSelectionCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/SingleSelectionCommand.cs
@@ -23,14 +23,14 @@ namespace GnomeSubtitles.Core.Command {
 
 public abstract class SingleSelectionCommand : Command {
        private TreePath path = null;
-       
+
        public SingleSelectionCommand (string description, bool canGroup) : this(description, canGroup, 
Base.Ui.View.Selection.Path) {
        }
 
        public SingleSelectionCommand (string description, bool canGroup, TreePath path) : base(description, 
canGroup) {
                this.path = path;
        }
-       
+
        protected TreePath Path {
                get { return path; }
        }
diff --git a/src/GnomeSubtitles/Core/Command/SplitSubtitlesCommand.cs 
b/src/GnomeSubtitles/Core/Command/SplitSubtitlesCommand.cs
index 31c5489..426e03b 100644
--- a/src/GnomeSubtitles/Core/Command/SplitSubtitlesCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/SplitSubtitlesCommand.cs
@@ -31,7 +31,7 @@ public class SplitSubtitlesCommand : MultipleSelectionCommand {
        private Subtitle[] subtitlesBefore = null;
        private TreePath[] pathsAfter = null;
        private Subtitle[] subtitlesAfter = null;
-       
+
        public SplitSubtitlesCommand () : base(description, false, SelectionIntended.Simple, null) {
        }
 
@@ -40,9 +40,9 @@ public class SplitSubtitlesCommand : MultipleSelectionCommand {
                ArrayList pathsBefore = new ArrayList();
                ArrayList subtitlesBefore = new ArrayList();
                ArrayList pathsAfter = new ArrayList();
-               
+
                SplitOperator splitOperator = new SplitOperator(subtitles, 
Base.Config.PrefsTimingsTimeBetweenSubtitles);
-               
+
                foreach (TreePath path in Paths) {
                        int subtitleIndex = Util.PathToInt(path) + subtitlesBefore.Count; //need to account 
for subtitles already added in this loop
                        Subtitle subtitle = subtitles[subtitleIndex];
@@ -58,7 +58,7 @@ public class SplitSubtitlesCommand : MultipleSelectionCommand {
                                subtitles.Add(subtitle2, subtitleIndex + 1);
                        }
                }
-               
+
                /* If any subtitle was changed, the command was successful */
                if (subtitlesBefore.Count == 0)
                        return false;
@@ -72,7 +72,7 @@ public class SplitSubtitlesCommand : MultipleSelectionCommand {
                        return true;
                }
        }
-       
+
        public override void Undo () {
                if (this.subtitlesAfter == null) {
                        this.subtitlesAfter = GetSubtitlesAfter(Base.Document.Subtitles, this.pathsAfter);
@@ -87,14 +87,14 @@ public class SplitSubtitlesCommand : MultipleSelectionCommand {
                Base.Ui.View.Insert(this.subtitlesAfter, this.pathsAfter, this.pathsAfter[0]);
                PostProcess();
        }
-       
+
        /* Protected members */
-       
+
        protected void PostProcess () {
                Base.Ui.Video.SeekToSelection(true);
        }
-       
-       
+
+
        /* Private members */
 
        private Subtitle[] GetSubtitlesAfter (GnomeSubtitles.Ui.View.Subtitles subtitles, TreePath[] 
pathsAfter) {
diff --git a/src/GnomeSubtitles/Core/Command/SynchronizeTimingsCommand.cs 
b/src/GnomeSubtitles/Core/Command/SynchronizeTimingsCommand.cs
index 2363f27..73e8e59 100644
--- a/src/GnomeSubtitles/Core/Command/SynchronizeTimingsCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/SynchronizeTimingsCommand.cs
@@ -53,7 +53,7 @@ public class SynchronizeTimingsCommand : FixedMultipleSelectionCommand {
                else {
                        int[] subtitleRange = GetSubtitleRange(subtitles);
                        Times[] timesToStore = GetCurrentTimes(subtitleRange, subtitles);
-                       
+
                        if (subtitleRange == null)
                                return false;
 
@@ -69,20 +69,20 @@ public class SynchronizeTimingsCommand : FixedMultipleSelectionCommand {
                }
                return true;
        }
-       
+
        private Times[] GetCurrentTimes (int[] subtitleRange, Ui.View.Subtitles subtitles) {
                int subtitleFrom = subtitleRange[0];
                int subtitleTo = subtitleRange[1];
                Times[] currentTimes = new Times[subtitleTo - subtitleFrom + 1];
-               
+
                for (int index = subtitleFrom; index <= subtitleTo ; index++) {
                        Subtitle subtitle = subtitles[index];
                        currentTimes[index - subtitleFrom] = subtitle.Times.Clone();
                }
-               
+
                return currentTimes;
        }
-       
+
        private int[] GetSubtitleRange (Ui.View.Subtitles subtitles) {
                if (SelectionType == SelectionType.Range) {
                        TreePath[] paths = Paths;
@@ -93,7 +93,7 @@ public class SynchronizeTimingsCommand : FixedMultipleSelectionCommand {
                else if (SelectionType == SelectionType.All) {
                        if (subtitles.Count < 2)
                                return null;
-                       
+
                        int pathFrom = 0;
                        int pathTo = subtitles.Count - 1;
                        return new int[] {pathFrom, pathTo};
diff --git a/src/GnomeSubtitles/Core/Command/TranslatorCommand.cs 
b/src/GnomeSubtitles/Core/Command/TranslatorCommand.cs
index 889c481..8aedbe7 100644
--- a/src/GnomeSubtitles/Core/Command/TranslatorCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/TranslatorCommand.cs
@@ -34,13 +34,13 @@ public class TranslatorCommand : FixedSingleSelectionCommand {
        private string previousValue = null; // initially, it's the former text replaced by translation
        private bool leftToRight = true; // direction of translation
        private static string description = Catalog.GetString("Translating");
-               
+
        public TranslatorCommand (bool leftToRight) : base(description, false, true) {
                this.leftToRight = leftToRight;
        }
-       
+
        /* Public members */
-               
+
        protected override bool ChangeValues () {
                /* If previousText is null, it's the first time the command is executed, so do translation.
                   Otherwise, it's undo or redo, so we only need to swap the values */
@@ -61,24 +61,24 @@ public class TranslatorCommand : FixedSingleSelectionCommand {
                        return true;
                }
        }
-       
+
        private bool DoTranslation () {
                if (Base.Ui.View.Selection.Count != 1) //TODO: for now, only works if 1 subtitle is selected
                        return false;
-               
+
                /* Show language selection dialogs if no languages are selected */
                if (!Base.SpellLanguages.HasActiveTextLanguage) {
                        Base.Dialogs.Get(typeof(SetTextLanguageDialog)).Show();
                        if (!Base.SpellLanguages.HasActiveTextLanguage)
                                return false;
                }
-               
+
                if (!Base.SpellLanguages.HasActiveTranslationLanguage) {
                        Base.Dialogs.Get(typeof(SetTranslationLanguageDialog)).Show();
                        if (!Base.SpellLanguages.HasActiveTranslationLanguage)
                                return false;
                }
-                       
+
                try {
                        Subtitle subtitle = Base.Document.Subtitles[Path];
                        if (leftToRight) {
@@ -91,7 +91,7 @@ public class TranslatorCommand : FixedSingleSelectionCommand {
                                string translatedText = Translator.TranslateText(subtitle.Translation.Get(), 
Base.SpellLanguages.ActiveTranslationLanguage.ID, Base.SpellLanguages.ActiveTextLanguage.ID, 
Translator.TIMEOUT);
                                subtitle.Text.Set(translatedText);
                        }
-                       
+
                        //TODO: if only one subtitle selected, set the cursor on the translated text box and 
select its text. If multiple subtitles translated, select those subtitles.
                        return true;
                }
diff --git a/src/GnomeSubtitles/Core/Command/VideoSetSubtitleTimingCommand.cs 
b/src/GnomeSubtitles/Core/Command/VideoSetSubtitleTimingCommand.cs
index 8de84bd..838be8d 100644
--- a/src/GnomeSubtitles/Core/Command/VideoSetSubtitleTimingCommand.cs
+++ b/src/GnomeSubtitles/Core/Command/VideoSetSubtitleTimingCommand.cs
@@ -28,17 +28,17 @@ public class VideoSetSubtitleStartCommand : ChangeStartCommand {
        public VideoSetSubtitleStartCommand (int frames) : base(frames, false) {
                SetCommandProperties();
        }
-       
+
        public VideoSetSubtitleStartCommand (TimeSpan time) : base(time, false) {
                SetCommandProperties();
        }
-       
+
        /* Private methods */
-       
+
        private void SetCommandProperties () {
                SetDescription(description);
                SetCanGroup(false);
-       }       
+       }
 }
 
 public class VideoSetSubtitleEndCommand : ChangeEndCommand {
@@ -47,17 +47,17 @@ public class VideoSetSubtitleEndCommand : ChangeEndCommand {
        public VideoSetSubtitleEndCommand (int frames) : base(frames, false) {
                SetCommandProperties();
        }
-       
+
        public VideoSetSubtitleEndCommand (TimeSpan time) : base(time, false) {
                SetCommandProperties();
        }
-       
+
        /* Private methods */
-       
+
        private void SetCommandProperties () {
                SetDescription(description);
                SetCanGroup(false);
-       }       
+       }
 }
 
 }
diff --git a/src/GnomeSubtitles/Core/Config.cs b/src/GnomeSubtitles/Core/Config.cs
index 54ff8bf..ed89a3b 100644
--- a/src/GnomeSubtitles/Core/Config.cs
+++ b/src/GnomeSubtitles/Core/Config.cs
@@ -35,7 +35,7 @@ public enum ConfigFileSaveNewlineOption { RememberLastUsed = 0, Specific = 2 };
 
 public class Config {
        private Client client = null;
-       
+
        /* Constant prefix strings */
        private const string keyPrefix = "/apps/gnome-subtitles/";
        private const string keyPrefs = keyPrefix + "preferences/";
@@ -77,7 +77,7 @@ public class Config {
        private const string keyPrefsTimingsTimeStep = keyPrefsTimings + "time_step"; //Not editable in the 
Preferences dialog
        private const string keyPrefsTimingsFramesStep = keyPrefsTimings + "frames_step"; //Not editable in 
the Preferences dialog
        private const string keyPrefsTimingsTimeBetweenSubtitles = keyPrefsTimings + "time_between_subs";
-       
+
        /* Cached values */
        private bool isValuePrefsViewLineLengthsCached = false;
        private bool valuePrefsViewLineLengths = false;
@@ -90,12 +90,12 @@ public class Config {
        private int valuePrefsTimingsTimeStep = -1;
        private int valuePrefsTimingsFramesStep = -1;
        private int valuePrefsTimingsTimeBetweenSubtitles = -1;
-       
+
 
        public Config () {
                client = new Client();
        }
-       
+
        /* Public properties */
 
        public string[] PrefsEncodingsShownInMenu {
@@ -105,27 +105,27 @@ public class Config {
                }
                set { SetStrings(keyPrefsEncodingsShownInMenu, value); }
        }
-       
+
        public string PrefsSpellCheckActiveTextLanguage {
                get { return GetString(keyPrefsSpellCheckActiveTextLanguage, String.Empty); }
                set { Set(keyPrefsSpellCheckActiveTextLanguage, value); }
        }
-       
+
        public string PrefsSpellCheckActiveTranslationLanguage {
                get { return GetString(keyPrefsSpellCheckActiveTranslationLanguage, String.Empty); }
                set { Set(keyPrefsSpellCheckActiveTranslationLanguage, value); }
        }
-       
+
        public bool PrefsSpellCheckAutocheck {
                get { return GetBool(keyPrefsSpellCheckAutocheck, false); }
                set { Set(keyPrefsSpellCheckAutocheck, value); }
        }
-       
+
        public bool PrefsVideoAutoChooseFile {
                get { return GetBool(keyPrefsVideoAutoChooseFile, true); }
                set { Set(keyPrefsVideoAutoChooseFile, value); }
        }
-       
+
        public bool PrefsVideoApplyReactionDelay {
                get {
                        if (!isValuePrefsVideoApplyReactionDelayCached) {
@@ -153,7 +153,7 @@ public class Config {
                        this.valuePrefsVideoReactionDelay = value;
                }
        }
-       
+
        public bool PrefsVideoSeekOnChange {
                get {
                        if (!isValuePrefsVideoSeekOnChangeCached) {
@@ -181,7 +181,7 @@ public class Config {
                        this.valuePrefsVideoSeekOnChangeRewind = value;
                }
        }
-       
+
        public bool PrefsViewLineLengths {
                get {
                        if (!isValuePrefsViewLineLengthsCached) {
@@ -201,7 +201,7 @@ public class Config {
                get { return GetInt(keyPrefsWindowHeight, 600, 200, true, 0, false); }
                set { Set(keyPrefsWindowHeight, value); }
        }
-       
+
        public int PrefsWindowWidth {
                get { return GetInt(keyPrefsWindowWidth, 690, 200, true, 0, false); }
                set { Set(keyPrefsWindowWidth, value); }
@@ -280,18 +280,18 @@ public class Config {
                get { return GetBool(keyPrefsTranslationSaveAll, true); }
                set { Set(keyPrefsTranslationSaveAll, value); }
        }
-       
+
        //Even though the default in gconf schema is true, if gconf is not working we're using false
        public bool PrefsBackupAutoBackup {
                get { return GetBool(keyPrefsBackupAutoBackup, false); }
                set { Set(keyPrefsBackupAutoBackup, value); }
        }
- 
+
        public int PrefsBackupBackupTime {
                get { return GetInt(keyPrefsBackupBackupTime, 120, 30, true, 0, false); }
                set { Set(keyPrefsBackupBackupTime, value); }
        }
-       
+
        /* Time in milliseconds */
        public int PrefsTimingsTimeStep {
                get {
@@ -305,7 +305,7 @@ public class Config {
                        this.valuePrefsTimingsTimeStep = value;
                }
        }
-       
+
        public int PrefsTimingsFramesStep {
                get {
                        if (this.valuePrefsTimingsFramesStep == -1) {
@@ -318,7 +318,7 @@ public class Config {
                        this.valuePrefsTimingsFramesStep = value;
                }
        }
-       
+
        public int PrefsTimingsTimeBetweenSubtitles {
                get {
                        if (this.valuePrefsTimingsTimeBetweenSubtitles == -1) {
@@ -332,9 +332,9 @@ public class Config {
                }
        }
 
-       
+
        /* Private members */
-       
+
        private string GetString (string key, string defaultValue) {
                try {
                        return (string)client.Get(key);
@@ -344,7 +344,7 @@ public class Config {
                        return defaultValue;
                }
        }
-       
+
        private bool GetBool (string key, bool defaultValue) {
                try {
                        return (bool)client.Get(key);
@@ -354,16 +354,16 @@ public class Config {
                        return defaultValue;
                }
        }
-       
+
        private int GetInt (string key, int defaultValue, int lowerLimit, bool useLowerLimit, int upperLimit, 
bool useUpperLimit) {
                try {
                        int number = (int)client.Get(key);
                        if (useLowerLimit && (number < lowerLimit))
                                return defaultValue;
-                       
+
                        if (useUpperLimit && (number > upperLimit))
                                return defaultValue;
-                       
+
                        return number;
                }
                catch (Exception e) {
@@ -371,7 +371,7 @@ public class Config {
                        return defaultValue;
                }
        }
-       
+
        private string[] GetStrings (string key, string[] defaultValue) {
                try {
                        string[] strings = client.Get(key) as string[];
diff --git a/src/GnomeSubtitles/Core/Document.cs b/src/GnomeSubtitles/Core/Document.cs
index 0e4251e..44f60bf 100644
--- a/src/GnomeSubtitles/Core/Document.cs
+++ b/src/GnomeSubtitles/Core/Document.cs
@@ -46,18 +46,18 @@ public class Document {
                New();
                ConnectInitSignals();
        }
-       
+
        public Document (string path, Encoding encoding) {
                Open(path, encoding);
                ConnectInitSignals();
        }
-       
+
        /* Events */
-       
+
        public event DocumentModificationStatusChangedHandler ModificationStatusChanged;
-       
+
        /* Public properties */
-       
+
        public FileProperties TextFile {
                get {
                        /*Note: this must be changed if the unsaved text filename is to be dynamically 
generated on Save time.
@@ -68,20 +68,20 @@ public class Document {
                        return textFile;
                }
        }
-       
+
        public FileProperties TranslationFile {
                get { return translationFile; }
        }
-       
+
        public bool IsTranslationLoaded {
                get { return isTranslationLoaded; }
        }
-       
+
        /* Whether the text file properties is set */
        public bool HasTextFileProperties {
                get { return textFile != null; }
        }
-       
+
        /* Whether the translation file properties is set */
        public bool HasTranslationFileProperties {
                get { return translationFile != null; }
@@ -90,49 +90,49 @@ public class Document {
        public Ui.View.Subtitles Subtitles {
                get { return subtitles; }
        }
-       
+
        public bool CanTextBeSaved {
                get { return canTextBeSaved; }
        }
-       
+
        public bool CanTranslationBeSaved {
                get { return canTranslationBeSaved; }
        }
-       
+
        public bool WasTextModified {
                get { return wasTextModified; }
        }
-       
+
        public bool WasTranslationModified {
                get { return wasTranslationModified; }
        }
-       
+
        public string UnsavedTextFilename {
                get {
                        //To translators: this is the filename for new files (before being saved for the 
first time)
                        return Catalog.GetString("Unsaved Subtitles");
                }
        }
-       
+
        public string UnsavedTranslationFilename {
                get {
                        string filename = (((textFile == null) || (textFile.Filename == String.Empty)) ? 
this.UnsavedTextFilename : textFile.FilenameWithoutExtension);
                        string language = (Base.SpellLanguages.HasActiveTranslationLanguage ? 
Base.SpellLanguages.ActiveTranslationLanguage.ID : String.Empty);
                        //To translators: this defines the name of a translation file. {0}=filename, 
{1}=language. Example: MovieName (fr translation)
                        string translatedString = (language != String.Empty ? Catalog.GetString("{0} ({1} 
translation)") : Catalog.GetString("{0} (translation)"));
-                       object[] args = {filename, language};                   
+                       object[] args = {filename, language};
                        return Core.Util.GetFormattedText(translatedString, args);
                }
        }
-       
+
 
        /* Public methods */
 
        public bool Save (FileProperties newFileProperties) {
                SubtitleSaver saver = new SubtitleSaver();
                saver.Save(subtitles, newFileProperties, SubtitleTextType.Text);
-               
-               textFile = saver.FileProperties;                
+
+               textFile = saver.FileProperties;
                canTextBeSaved = true;
 
                ClearTextModified();
@@ -164,34 +164,34 @@ public class Document {
 
                if (newTranslationFile.SubtitleType != SubtitleType.Unknown)
                        canTranslationBeSaved = true;
-       
+
                this.translationFile = newTranslationFile;
                this.isTranslationLoaded = true;
        }
-       
+
        public void Close () {
-               DisconnectInitSignals();                
+               DisconnectInitSignals();
        }
-       
+
        public void CloseTranslation () {
                RemoveTranslationFromSubtitles();
                ClearTranslationStatus();
        }
-         
+
        public bool SaveTranslation (FileProperties newFileProperties) {
                SubtitleSaver saver = new SubtitleSaver();
                saver.Save(subtitles, newFileProperties, SubtitleTextType.Translation);
-               
-               translationFile = saver.FileProperties;         
+
+               translationFile = saver.FileProperties;
                canTranslationBeSaved = true;
-               
+
                ClearTranslationModified();
                return true;
        }
 
 
        /* Private methods */
-       
+
        /* Used in the object construction. Path is used when running from the command line specifying an 
inexistent file. */
        private void New (string path) {
                New();
@@ -202,7 +202,7 @@ public class Document {
        private void New () {
                SubtitleFactory factory = new SubtitleFactory();
                factory.Verbose = true;
-               
+
                subtitles = new Ui.View.Subtitles(factory.New());
        }
 
@@ -225,7 +225,7 @@ public class Document {
 
                subtitles = new Ui.View.Subtitles(openedSubtitles);
                textFile = factory.FileProperties;
-               
+
                if (textFile.SubtitleType != SubtitleType.Unknown)
                        canTextBeSaved = true;
        }
@@ -241,25 +241,25 @@ public class Document {
                if (!wasTextModified) //Emit the event if text is also not in modified state
                        EmitModificationStatusChangedEvent(false);
        }
-       
+
        private void RemoveTranslationFromSubtitles () {
                Translations translations = new Translations();
                translations.Clear(subtitles);
        }
-       
+
        private void ClearTranslationStatus () {
                this.isTranslationLoaded = false;
                this.wasTranslationModified = false;
                this.translationFile = null;
                this.canTranslationBeSaved = false;
-               
+
                ClearTranslationModified();
        }
-       
+
        private void AddExtraSubtitles (SubLib.Core.Domain.Subtitles translation) {
                int extraCount = translation.Collection.Count - subtitles.Collection.Count;
                if (extraCount > 0)
-                       subtitles.AddExtra(extraCount); 
+                       subtitles.AddExtra(extraCount);
        }
 
        private Encoding GetFallbackEncoding () {
@@ -273,23 +273,23 @@ public class Document {
                        return Encoding.GetEncoding(encodingDescription.CodePage);
                }
        }
-       
+
        private FileProperties CreateNewTextFileProperties () {
                return new FileProperties(this.UnsavedTextFilename);
        }
-       
-       
-       
+
+
+
        /* Event members */
-       
+
        private void ConnectInitSignals () {
                Base.CommandManager.CommandActivated += OnCommandManagerCommandActivated;
        }
-       
+
        private void DisconnectInitSignals () {
                Base.CommandManager.CommandActivated -= OnCommandManagerCommandActivated;
        }
-       
+
        private void OnCommandManagerCommandActivated (object o, CommandActivatedArgs args) {
        if ((args.Target == CommandTarget.Normal) && (!wasTextModified)) {
                        wasTextModified = true;
@@ -300,12 +300,12 @@ public class Document {
                        EmitModificationStatusChangedEvent(true);
                }
                else if ((args.Target == CommandTarget.NormalAndTranslation) && ((!wasTextModified) || 
(!wasTranslationModified))) {
-                       wasTextModified = true;                 
+                       wasTextModified = true;
                        wasTranslationModified = true;
                        EmitModificationStatusChangedEvent(true);
                }
     }
-       
+
        private void EmitModificationStatusChangedEvent (bool modified) {
                if (ModificationStatusChanged != null)
                        ModificationStatusChanged(modified);
diff --git a/src/GnomeSubtitles/Core/DragDrop.cs b/src/GnomeSubtitles/Core/DragDrop.cs
index ecff500..5520209 100644
--- a/src/GnomeSubtitles/Core/DragDrop.cs
+++ b/src/GnomeSubtitles/Core/DragDrop.cs
@@ -25,7 +25,7 @@ namespace GnomeSubtitles.Core {
 
 public class DragDrop {
        private TargetEntry targetUriList = new TargetEntry("text/uri-list", 0, DragDropTargetUriList);
-    
+
        /* Public constants */
        public const uint DragDropTargetUriList = 0;
 
@@ -36,7 +36,7 @@ public class DragDrop {
 
 
        /* Private members */
-       
+
        private void SetDropTargets () {
                TargetEntry[] targetEntries = new TargetEntry[] { targetUriList };
                Gtk.Drag.DestSet(Base.GetWidget(WidgetNames.SubtitleAreaVBox), DestDefaults.All, 
targetEntries, DragAction.Copy);
diff --git a/src/GnomeSubtitles/Core/EncodingDescription.cs b/src/GnomeSubtitles/Core/EncodingDescription.cs
index 100d907..947ace1 100644
--- a/src/GnomeSubtitles/Core/EncodingDescription.cs
+++ b/src/GnomeSubtitles/Core/EncodingDescription.cs
@@ -26,25 +26,25 @@ public struct EncodingDescription : IComparable {
        private string name;
        private string description;
        private static EncodingDescription emptyEncodingDescription = new EncodingDescription(-1, "-1", "-1");
-       
+
        public EncodingDescription (int codePage, string name, string description) {
                this.codePage = codePage;
                this.name = name;
                this.description = description;
        }
-       
+
        public int CodePage {
                get { return codePage; }
        }
-       
+
        public string Name {
                get { return name; }
        }
-       
+
        public string Description {
                get { return description; }
        }
-       
+
        public int CompareTo (object obj) {
                if (obj is EncodingDescription) {
                        EncodingDescription obj2 = (EncodingDescription)obj;
@@ -55,7 +55,7 @@ public struct EncodingDescription : IComparable {
                                return this.name.CompareTo(obj2.name);
                }
                else
-                       throw new ArgumentException("Object is not EncodingDescription");    
+                       throw new ArgumentException("Object is not EncodingDescription");
        }
 
        /* Static members */
@@ -63,7 +63,7 @@ public struct EncodingDescription : IComparable {
        public static EncodingDescription Empty {
                get { return emptyEncodingDescription; }
        }
-       
+
 }
 
 }
\ No newline at end of file
diff --git a/src/GnomeSubtitles/Core/Encodings.cs b/src/GnomeSubtitles/Core/Encodings.cs
index 67256dd..fc6be9c 100644
--- a/src/GnomeSubtitles/Core/Encodings.cs
+++ b/src/GnomeSubtitles/Core/Encodings.cs
@@ -45,7 +45,7 @@ public class Encodings {
                new EncodingDescription(28605, "ISO-8859-15", Catalog.GetString("Western")),
                new EncodingDescription(28606, "ISO-8859-16", Catalog.GetString("Romanian")),
                /* ISO-8859-8-I not used */
-               
+
                new EncodingDescription(65001, "UTF-8", Catalog.GetString("Unicode")), /* Added */
                new EncodingDescription(65000, "UTF-7", Catalog.GetString("Unicode")),
                new EncodingDescription(1200, "UTF-16", Catalog.GetString("Unicode")),
@@ -60,19 +60,19 @@ public class Encodings {
                new EncodingDescription(951, "BIG5-HKSCS", Catalog.GetString("Chinese Traditional")),
                new EncodingDescription(866, "CP866", Catalog.GetString("Cyrillic/Russian")),
                /* ARMSCII-8 not used */
-               
+
                new EncodingDescription(51932, "EUC-JP", Catalog.GetString("Japanese")),
                new EncodingDescription(932, "CP932", Catalog.GetString("Japanese")),
                /* EUC-JP-MS not used */
-               
+
                new EncodingDescription(51949, "EUC-KR", Catalog.GetString("Korean")),
                /* EUC-TW not used */
-               
+
                new EncodingDescription(54936, "GB18030", Catalog.GetString("Chinese Simplified")),
                new EncodingDescription(936, "GB2312", Catalog.GetString("Chinese Simplified")),
                new EncodingDescription(936, "GBK", Catalog.GetString("Chinese Simplified")),
                /* GEOSTD8, HZ not used */
-               
+
                new EncodingDescription(850, "IBM850", Catalog.GetString("Western")),
                new EncodingDescription(852, "IBM852", Catalog.GetString("Central European")),
                new EncodingDescription(855, "IBM855", Catalog.GetString("Cyrillic")),
@@ -85,17 +85,17 @@ public class Encodings {
                new EncodingDescription(865, "IBM865", Catalog.GetString("Nordic")), /* Added */
                new EncodingDescription(866, "IBM866", Catalog.GetString("Cyrillic")), /* Added */
                new EncodingDescription(869, "IBM869", Catalog.GetString("Greek")), /* Added */
-               
+
                new EncodingDescription(50221, "ISO-2022-JP", Catalog.GetString("Japanese")),
                new EncodingDescription(50225, "ISO-2022-KR", Catalog.GetString("Korean")),
                new EncodingDescription(1361, "JOHAB", Catalog.GetString("Korean")),
                new EncodingDescription(20866, "KOI8-R", Catalog.GetString("Cyrillic")),
                new EncodingDescription(21866, "KOI8-U", Catalog.GetString("Cyrillic/Ukrainian")), /* Added */
                /* ISO-IR-111, KOI8R, KOI8U not used */
-               
+
                new EncodingDescription(932, "SHIFT_JIS", Catalog.GetString("Japanese")),
                /* TCVN, TIS-620, UHC, VISCII not used */
-               
+
                new EncodingDescription(1250, "WINDOWS-1250", Catalog.GetString("Central")),
                new EncodingDescription(1251, "WINDOWS-1251", Catalog.GetString("Cyrillic")),
                new EncodingDescription(1252, "WINDOWS-1252", Catalog.GetString("Western")),
@@ -106,20 +106,20 @@ public class Encodings {
                new EncodingDescription(1257, "WINDOWS-1257", Catalog.GetString("Baltic")),
                new EncodingDescription(1258, "WINDOWS-1258", Catalog.GetString("Vietnamese")),
        };
-       
+
        /* Public properties */
-       
+
        public static EncodingDescription[] All {
-               get { return descriptions; }    
+               get { return descriptions; }
        }
 
        public static EncodingDescription SystemDefault {
                get {
                        string description = Catalog.GetString("Current Locale");
-                       
+
                        Encoding defaultEncoding = Encoding.Default;
                        int codePage = defaultEncoding.CodePage;
-               
+
                        string name = String.Empty;
                        EncodingDescription tempDesc = EncodingDescription.Empty;
                        if (Find(codePage, ref tempDesc))
@@ -130,9 +130,9 @@ public class Encodings {
                        return new EncodingDescription(codePage, name, description);
                }
        }
-       
+
        /* Public methods */
-       
+
        /// <summary>Finds the description for the encoding with the specified name.</summary>
        /// <param name="name">The encoding's name.</param>
        /// <param name="description">The encoding's description that was found.</param>
@@ -146,7 +146,7 @@ public class Encodings {
                }
                return false;
        }
-       
+
        public static bool Find (int codePage, ref EncodingDescription description) {
                foreach (EncodingDescription desc in descriptions) {
                        if (desc.CodePage == codePage) {
@@ -156,7 +156,7 @@ public class Encodings {
                }
                return false;
        }
-       
+
        public static string GetEncodingName (int codePage) {
                EncodingDescription desc = EncodingDescription.Empty;
                if (Find(codePage, ref desc))
diff --git a/src/GnomeSubtitles/Core/EventHandlers.cs b/src/GnomeSubtitles/Core/EventHandlers.cs
index 6de82b0..e63a73b 100644
--- a/src/GnomeSubtitles/Core/EventHandlers.cs
+++ b/src/GnomeSubtitles/Core/EventHandlers.cs
@@ -33,18 +33,18 @@ namespace GnomeSubtitles.Core {
 
 public class EventHandlers {
        private bool buttonStartEndKeyPressed = false; //Used to match grab focus and key release events
-       
+
 
        /* File Menu */
-       
+
        public void OnFileNew (object o, EventArgs args) {
                Base.Ui.New();
        }
-       
+
        public void OnFileOpen (object o, EventArgs args) {
                Base.Ui.Open();
        }
-       
+
        public void OnFileSave (object o, EventArgs args) {
                Base.Ui.Save();
 
@@ -52,43 +52,43 @@ public class EventHandlers {
                        OnFileTranslationSave(o, args);
                }
        }
-       
+
        public void OnFileSaveAs (object o, EventArgs args) {
                Base.Ui.SaveAs();
-               
+
                if (Base.Document.IsTranslationLoaded && Base.Config.PrefsTranslationSaveAll) {
                        OnFileTranslationSave(o, args);
                }
        }
-       
+
        public void OnFileTranslationNew (object o, EventArgs args) {
                Base.Ui.TranslationNew();
        }
-       
+
        public void OnFileTranslationOpen (object o, EventArgs args) {
                Base.Ui.TranslationOpen();
        }
-       
+
        public void OnFileTranslationSave (object o, EventArgs args) {
                Base.Ui.TranslationSave();
        }
-       
+
        public void OnFileTranslationSaveAs (object o, EventArgs args) {
                Base.Ui.TranslationSaveAs();
        }
-       
+
        public void OnFileTranslationClose (object o, EventArgs args) {
                Base.Ui.TranslationClose();
        }
-       
+
        public void OnFileHeaders (object o, EventArgs args) {
                Base.Dialogs.Get(typeof(HeadersDialog)).Show();
        }
-       
+
        public void OnFileProperties (object o, EventArgs args) {
                Base.Dialogs.Get(typeof(FilePropertiesDialog)).Show();
        }
-       
+
        public void OnFileClose (object o, EventArgs args) {
                Base.Ui.Close();
        }
@@ -99,57 +99,57 @@ public class EventHandlers {
 
 
        /* Edit Menu */
-       
+
        public void OnEditUndo (object o, EventArgs args) {
                Base.CommandManager.Undo();
        }
-       
+
        public void OnEditRedo (object o, EventArgs args) {
                Base.CommandManager.Redo();
        }
-       
+
        public void OnEditCopy (object o, EventArgs args) {
                Base.Clipboards.Copy();
        }
-       
+
        public void OnEditCut (object o, EventArgs args) {
                Base.Clipboards.Cut();
        }
-       
+
        public void OnEditPaste (object o, EventArgs args) {
                Base.Clipboards.Paste();
        }
-       
+
        public void OnEditFormatBold (object o, EventArgs args) {
-               bool newBoldValue = ((o is CheckMenuItem) ? (o as CheckMenuItem).Active : (o as 
ToggleToolButton).Active);      
+               bool newBoldValue = ((o is CheckMenuItem) ? (o as CheckMenuItem).Active : (o as 
ToggleToolButton).Active);
                Base.CommandManager.Execute(new ChangeBoldStyleCommand(newBoldValue));
        }
-       
+
        public void OnEditFormatItalic (object o, EventArgs args) {
                bool newItalicValue = ((o is CheckMenuItem) ? (o as CheckMenuItem).Active : (o as 
ToggleToolButton).Active);
                Base.CommandManager.Execute(new ChangeItalicStyleCommand(newItalicValue));
        }
-       
+
        public void OnEditFormatUnderline (object o, EventArgs args) {
                bool newUnderlineValue = ((o is CheckMenuItem) ? (o as CheckMenuItem).Active : (o as 
ToggleToolButton).Active);
                Base.CommandManager.Execute(new ChangeUnderlineStyleCommand(newUnderlineValue));
        }
-       
+
        public void OnEditSplit (object o, EventArgs args) {
                Base.CommandManager.Execute(new SplitSubtitlesCommand());
        }
-       
+
        public void OnEditMerge (object o, EventArgs args) {
                Base.CommandManager.Execute(new MergeSubtitlesCommand());
        }
-       
+
        public void OnEditInsertSubtitleBefore (object o, EventArgs args) {
                if ((Base.Document.Subtitles.Count == 0) || (Base.Ui.View.Selection.Count == 0))
                        Base.CommandManager.Execute(new InsertFirstSubtitleCommand());
-               else 
+               else
                        Base.CommandManager.Execute(new InsertSubtitleBeforeCommand());
        }
-       
+
        public void OnEditInsertSubtitleAfter (object o, EventArgs args) {
                if (Base.Document.Subtitles.Count == 0)
                        Base.CommandManager.Execute(new InsertFirstSubtitleCommand());
@@ -158,11 +158,11 @@ public class EventHandlers {
                else
                        Base.CommandManager.Execute(new InsertLastSubtitleCommand());
        }
-       
+
        public void OnEditInsertSubtitleAtVideoPosition (object o, EventArgs args) {
                Base.CommandManager.Execute(new InsertSubtitleAtVideoPositionCommand());
        }
-       
+
        public void OnEditDeleteSubtitles (object o, EventArgs args) {
                if (Base.Ui.View.Selection.Count > 0)
                        Base.CommandManager.Execute(new DeleteSubtitlesCommand());
@@ -174,7 +174,7 @@ public class EventHandlers {
 
 
        /* View Menu */
-       
+
        public void OnViewTimes (object o, EventArgs args) {
                if ((o as RadioMenuItem).Active)
                        Base.TimingMode = TimingMode.Times;
@@ -184,24 +184,24 @@ public class EventHandlers {
                if ((o as RadioMenuItem).Active)
                        Base.TimingMode = TimingMode.Frames;
        }
-                       
+
        public void OnViewLineLengthsToggled (object o, EventArgs args) {
                CheckMenuItem menuItem = o as CheckMenuItem;
                Base.Config.PrefsViewLineLengths = menuItem.Active;
        }
-       
+
        public void OnViewVideo (object o, EventArgs args) {
                if ((o as CheckMenuItem).Active)
                        Base.Ui.Video.Show();
                else
                        Base.Ui.Video.Hide();
-       }       
-               
+       }
+
        public void OnViewVideoSubtitlesText (object o, EventArgs args) {
                if ((o as RadioMenuItem).Active)
                        Base.Ui.Video.Overlay.ToShowText = true;
        }
-       
+
        public void OnViewVideoSubtitlesTranslation (object o, EventArgs args) {
                if ((o as RadioMenuItem).Active)
                        Base.Ui.Video.Overlay.ToShowText = false;
@@ -209,45 +209,45 @@ public class EventHandlers {
 
 
        /* Search Menu */
-       
+
        public void OnSearchFind (object o, EventArgs args) {
                Base.Ui.View.Search.ShowFind();
        }
-       
+
        public void OnSearchFindNext (object o, EventArgs args) {
                Base.Ui.View.Search.FindNext();
        }
-       
+
        public void OnSearchFindPrevious (object o, EventArgs args) {
                Base.Ui.View.Search.FindPrevious();
        }
-       
+
        public void OnSearchReplace (object o, EventArgs args) {
                Base.Ui.View.Search.ShowReplace();
        }
 
 
        /*      Timings Menu */
-       
+
        public void OnTimingsAdjust (object o, EventArgs args) {
                Base.Dialogs.Get(typeof(TimingsAdjustDialog)).Show();
        }
-       
+
        public void OnTimingsShift (object o, EventArgs args) {
                Base.Dialogs.Get(typeof(TimingsShiftDialog)).Show();
        }
-       
+
        public void OnTimingsSynchronize (object o, EventArgs args) {
                Base.Dialogs.Get(typeof(TimingsSynchronizeDialog)).Show();
        }
 
 
        /* Video Menu */
-               
+
        public void OnVideoOpen (object o, EventArgs args) {
                Base.Ui.OpenVideo();
        }
-       
+
        public void OnVideoClose (object o, EventArgs args) {
                Base.CloseVideo();
        }
@@ -256,48 +256,48 @@ public class EventHandlers {
                ToggleButton button = Base.GetWidget(WidgetNames.VideoPlayPauseButton) as ToggleButton;
                button.Active = !button.Active; //Toggle() only emits the Toggled event
        }
-       
+
        public void OnVideoRewind (object o, EventArgs args) {
                Base.Ui.Video.Rewind();
        }
-       
+
        public void OnVideoForward (object o, EventArgs args) {
                Base.Ui.Video.Forward();
        }
-       
+
        public void OnVideoSpeedUp (object o, EventArgs args) {
            Base.Ui.Video.SpeedUp();
-       } 
-       
+       }
+
        public void OnVideoSpeedDown (object o, EventArgs args) {
            Base.Ui.Video.SpeedDown();
        }
-       
+
        public void OnVideoSpeed (object o, EventArgs args) {
            Base.Ui.Video.SpeedReset();
-       } 
-       
+       }
+
        public void OnVideoSeekTo (object o, EventArgs args) {
                Base.Dialogs.Get(typeof(VideoSeekToDialog)).Show();
        }
-       
+
        //TODO allow to seek when multiple subtitles are selected (use first)
        public void OnVideoSeekToSelection (object o, EventArgs args) {
-               Base.Ui.Video.SeekToSelection();        
+               Base.Ui.Video.SeekToSelection();
        }
-               
+
        public void OnVideoSelectNearestSubtitle (object o, EventArgs args) {
                Base.Ui.Video.SelectNearestSubtitle();
        }
-               
+
        public void OnVideoAutoSelectSubtitles (object o, EventArgs args) {
                Base.Ui.View.SetAutoSelectSubtitles((o as CheckMenuItem).Active);
        }
-               
+
        public void OnVideoLoopSelectionPlayback (object o, EventArgs args) {
                Base.Ui.Video.SetLoopSelectionPlayback((o as CheckMenuItem).Active);
        }
-               
+
        public void OnVideoSetSubtitleStart (object o, EventArgs args) {
                if (Base.TimingMode == TimingMode.Times) {
                        TimeSpan time = Base.Ui.Video.Position.CurrentTime;
@@ -312,9 +312,9 @@ public class EventHandlers {
                                frames -= 
(int)TimingUtil.TimeMillisecondsToFrames(Base.Config.PrefsVideoReactionDelay, Base.Ui.Video.FrameRate);
                        }
                        Base.CommandManager.Execute(new VideoSetSubtitleStartCommand(frames));
-               }                       
+               }
        }
-               
+
        public void OnVideoSetSubtitleEnd (object o, EventArgs args) {
                if (Base.TimingMode == TimingMode.Times) {
                        TimeSpan time = Base.Ui.Video.Position.CurrentTime;
@@ -351,14 +351,14 @@ public class EventHandlers {
                }
        }
 
-       public void OnVideoSetSubtitleStartEndGrabFocus (object o, EventArgs args) {                    
+       public void OnVideoSetSubtitleStartEndGrabFocus (object o, EventArgs args) {
                if (!buttonStartEndKeyPressed) {
                        OnVideoSetSubtitleStart(o, args);
                        buttonStartEndKeyPressed = true;
                }
        }
 
-       public void OnVideoSetSubtitleStartEndKeyRelease (object o, KeyReleaseEventArgs args) {               
  
+       public void OnVideoSetSubtitleStartEndKeyRelease (object o, KeyReleaseEventArgs args) {
                if (buttonStartEndKeyPressed){
                        OnVideoSetSubtitleStartEnd(o, args);
                        buttonStartEndKeyPressed = false;
@@ -366,35 +366,35 @@ public class EventHandlers {
        }
 
        /* Tools Menu */
-               
+
        public void OnToolsAutocheckSpelling (object o, EventArgs args) {
                bool enabled = (o as CheckMenuItem).Active;
                Base.SpellLanguages.Enabled = enabled;
        }
-       
+
        public void OnToolsSetTextLanguage (object o, EventArgs args) {
                Base.Dialogs.Get(typeof(SetTextLanguageDialog)).Show();
        }
-       
+
        public void OnToolsSetTranslationLanguage (object o, EventArgs args) {
                Base.Dialogs.Get(typeof(SetTranslationLanguageDialog)).Show();
        }
-               
+
        public void OnToolsTranslateText (object o, EventArgs args) {
                Base.CommandManager.Execute(new TranslatorCommand(true));
        }
-               
+
        public void OnToolsTranslateTranslation (object o, EventArgs args) {
-               Base.CommandManager.Execute(new TranslatorCommand(false));      
+               Base.CommandManager.Execute(new TranslatorCommand(false));
        }
-       
-       
+
+
        /*      Help Menu */
-       
+
        public void OnHelpContents (object o, EventArgs args) {
                Util.OpenUrl("ghelp:gnome-subtitles");
        }
-       
+
        public void OnHelpKeyboardShortcuts (object o, EventArgs args) {
                Util.OpenUrl("http://gnomesubtitles.org/shortcuts";);
        }
@@ -402,23 +402,23 @@ public class EventHandlers {
        public void OnHelpRequestFeature (object o, EventArgs args) {
                Util.OpenBugReport();
        }
-       
+
        public void OnHelpReportBug (object o, EventArgs args) {
                Util.OpenBugReport();
        }
-       
+
        public void OnHelpAbout (object o, EventArgs args) {
                Base.Dialogs.Get(typeof(Dialog.AboutDialog)).Show();
        }
-       
-       
+
+
        /*      Window  */
-       
+
        public void OnWindowDelete (object o, DeleteEventArgs args) {
        Base.Ui.Quit();
        args.RetVal = true;
     }
-    
+
     public void OnSizeAllocated (object o, SizeAllocatedArgs args) {
        Base.Config.PrefsWindowWidth = args.Allocation.Width;
        Base.Config.PrefsWindowHeight = args.Allocation.Height;
@@ -442,11 +442,11 @@ public class EventHandlers {
 
 
        /*      Subtitle View   */
-    
+
     public void OnRowActivated (object o, RowActivatedArgs args) {
        Base.Ui.Video.SeekToPath(args.Path);
     }
-    
+
     public void OnSubtitleViewKeyPressed (object o, KeyPressEventArgs args) {
        Gdk.Key key = args.Event.Key;
        if (key == Gdk.Key.Delete)
@@ -470,8 +470,8 @@ public class EventHandlers {
 
                Gtk.Drag.Finish(args.Context, success, false, args.Time);
        }
-       
-       
+
+
        /* Global Accelerators */
 
        public void OnGlobalSubtitleStartIncrease (object o, EventArgs args) {
@@ -479,12 +479,12 @@ public class EventHandlers {
                        Base.Ui.Edit.SpinButtons.StartSpinButtonIncreaseStep();
                }
        }
-       
+
        public void OnGlobalSubtitleStartDecrease (object o, EventArgs args) {
                /* Do nothing if there isn't only 1 subtitle selected */
                if (Base.Ui.View.Selection.Count != 1)
                        return;
-               
+
                Subtitle subtitle = Base.Ui.View.Selection.Subtitle;
                if ((Base.TimingModeIsTimes && (subtitle.Times.Start >= 
TimeSpan.FromMilliseconds(Base.Config.PrefsTimingsTimeStep)))
                                || (!Base.TimingModeIsTimes) && (subtitle.Frames.Start >= 
Base.Config.PrefsTimingsFramesStep)){
@@ -492,18 +492,18 @@ public class EventHandlers {
                        Base.Ui.Edit.SpinButtons.StartSpinButtonDecreaseStep();
                }
        }
-       
+
        public void OnGlobalSubtitleEndIncrease (object o, EventArgs args) {
                if (Base.Ui.View.Selection.Count == 1) {
                        Base.Ui.Edit.SpinButtons.EndSpinButtonIncreaseStep();
                }
        }
-       
+
        public void OnGlobalSubtitleEndDecrease (object o, EventArgs args) {
                /* Do nothing if there isn't only 1 subtitle selected */
                if (Base.Ui.View.Selection.Count != 1)
                        return;
-               
+
                Subtitle subtitle = Base.Ui.View.Selection.Subtitle;
                if ((Base.TimingModeIsTimes && (subtitle.Times.End >= 
TimeSpan.FromMilliseconds(Base.Config.PrefsTimingsTimeStep)))
                                || (!Base.TimingModeIsTimes) && (subtitle.Frames.End >= 
Base.Config.PrefsTimingsFramesStep)){
@@ -511,12 +511,12 @@ public class EventHandlers {
                        Base.Ui.Edit.SpinButtons.EndSpinButtonDecreaseStep();
                }
        }
-       
+
        public void OnGlobalSelectionShiftIncrease (object o, EventArgs args) {
                /* Do nothing if no subtitles are selected */
                if (Base.Ui.View.Selection.Count == 0)
                        return;
-               
+
                if (Base.TimingModeIsTimes) {
                        Base.CommandManager.Execute(new 
ShiftTimingsCommand(TimeSpan.FromMilliseconds(Base.Config.PrefsTimingsTimeStep), SelectionIntended.Simple));
                }
@@ -524,14 +524,14 @@ public class EventHandlers {
                        Base.CommandManager.Execute(new 
ShiftTimingsCommand(Base.Config.PrefsTimingsFramesStep, SelectionIntended.Simple));
                }
        }
-       
+
        public void OnGlobalSelectionShiftDecrease (object o, EventArgs args) {
                Subtitle firstSelectedSubtitle = Base.Ui.View.Selection.FirstSubtitle;
-               
+
                /* Do nothing if no subtitles are selected */
                if (firstSelectedSubtitle == null)
                        return;
-               
+
                if (Base.TimingModeIsTimes) {
                        TimeSpan timeStep = TimeSpan.FromMilliseconds(Base.Config.PrefsTimingsTimeStep);
                        if (firstSelectedSubtitle.Times.Start >= timeStep) {
diff --git a/src/GnomeSubtitles/Core/GlobalAccelerators.cs b/src/GnomeSubtitles/Core/GlobalAccelerators.cs
index 9b46149..38c5399 100644
--- a/src/GnomeSubtitles/Core/GlobalAccelerators.cs
+++ b/src/GnomeSubtitles/Core/GlobalAccelerators.cs
@@ -26,40 +26,40 @@ namespace GnomeSubtitles.Core {
 public class GlobalAccelerators {
        private AccelGroup accelGroup = null;
        private Menu hiddenMenu = null; //Needed to assign actions, not visible
-       
+
        public GlobalAccelerators () {
                Base.InitFinished += OnBaseInitFinished;
        }
-       
+
        /* Private members */
-       
+
        private void Init () {
                this.accelGroup = new AccelGroup();
                this.hiddenMenu = new Menu();
-               
+
                Base.Ui.Window.AddAccelGroup(this.accelGroup);
 
                AddAccelerator((uint)Gdk.Key.KP_Add, Gdk.ModifierType.ControlMask, AccelFlags.Visible, 
Base.Handlers.OnGlobalSubtitleStartIncrease);
                AddAccelerator((uint)Gdk.Key.KP_Subtract, Gdk.ModifierType.ControlMask, AccelFlags.Visible, 
Base.Handlers.OnGlobalSubtitleStartDecrease);
-               
+
                AddAccelerator((uint)Gdk.Key.KP_Add, Gdk.ModifierType.Mod1Mask, AccelFlags.Visible, 
Base.Handlers.OnGlobalSubtitleEndIncrease);
                AddAccelerator((uint)Gdk.Key.KP_Subtract, Gdk.ModifierType.Mod1Mask, AccelFlags.Visible, 
Base.Handlers.OnGlobalSubtitleEndDecrease);
-               
+
                AddAccelerator((uint)Gdk.Key.KP_Add, Gdk.ModifierType.ShiftMask, AccelFlags.Visible, 
Base.Handlers.OnGlobalSelectionShiftIncrease);
                AddAccelerator((uint)Gdk.Key.KP_Subtract, Gdk.ModifierType.ShiftMask, AccelFlags.Visible, 
Base.Handlers.OnGlobalSelectionShiftDecrease);
        }
-       
+
        private void AddAccelerator (uint key, ModifierType modifiers, AccelFlags accelFlags, EventHandler 
handler) {
                MenuItem menuItem = new MenuItem();
                menuItem.AddAccelerator("activate", this.accelGroup, key, modifiers, accelFlags);
                menuItem.Activated += handler;
                menuItem.Show();
-               
+
                this.hiddenMenu.Append(menuItem);
        }
-       
+
        /* Event members */
-       
+
        private void OnBaseInitFinished () {
                Init();
     }
diff --git a/src/GnomeSubtitles/Core/Search.cs b/src/GnomeSubtitles/Core/Search.cs
index b414173..d62796d 100644
--- a/src/GnomeSubtitles/Core/Search.cs
+++ b/src/GnomeSubtitles/Core/Search.cs
@@ -34,20 +34,20 @@ public class Search {
 
        public Search () {
        }
-       
+
        /* Public members */
 
        public void ShowFind () {
                InitDialog(false);
        }
-       
+
        public void ShowReplace () {
                InitDialog(true);
        }
 
        public bool Find () {
                Base.Ui.Menus.EnableFindNextPrevious();
-               
+
                if (dialog.Backwards)
                        return FindPrevious();
                else
@@ -59,41 +59,41 @@ public class Search {
        public bool FindPrevious () {
                return Find(true);
        }
-       
+
        /// <summary>Finds the next match.</summary>
        /// <returns>Whether text was found.</returns>
        public bool FindNext () {
                return Find(false);
        }
-       
+
        public bool Replace () {
                if (!SelectionMatchesSearch())
                        return Find();
-               
+
                string replacement = dialog.Replacement;
                Base.Ui.Edit.ReplaceSelection(replacement);
-               
+
                return Find();
        }
-       
+
        public void ReplaceAll () {
                Base.CommandManager.Execute(new ReplaceAllCommand(dialog.ForwardRegex, dialog.Replacement));
        }
-       
+
        /// <summary>Does some cleanup to make sure the dialog is like a brand new one.</summary>
        /// <remarks>The old dialog is closed and nullified</remarks>
        public void Clear () {
                if (dialog != null) {
                        dialog.Destroy();
                        dialog = null;
-               }                       
+               }
        }
 
        #region Private methods
-       
+
        private void InitDialog (bool showReplace) {
                dialog = Base.Dialogs.Get(typeof(SearchDialog)) as SearchDialog;
-       
+
                dialog.Show(showReplace);
        }
 
@@ -118,7 +118,7 @@ public class Search {
                SubtitleSearchOptions options = new SubtitleSearchOptions(regex, textType, subtitle, index, 
dialog.Wrap, backwards);
                SearchOperator searchOp = new SearchOperator(Base.Document.Subtitles);
                SubtitleSearchResults results = searchOp.Find(options);
-               
+
                /* If no text was found, return */
                if (results == null)
                        return false;
@@ -153,10 +153,10 @@ public class Search {
                }
                else {
                        newStart = start;
-                       newEnd = end;           
+                       newEnd = end;
                }
        }
-       
+
        /// <summary>The currently focused subtitle, or 0 if none is.</summary>
        private int GetFocusedSubtitle() {
                        TreePath focus = Base.Ui.View.Selection.Focus;
@@ -165,16 +165,16 @@ public class Search {
                        else
                                return 0;
        }
-       
+
        private bool SelectionMatchesSearch () {
                        string selection = Base.Ui.Edit.SelectedTextContent;
                        if (selection == String.Empty)
                                return false;
-                       
+
                        Match match = dialog.ForwardRegex.Match(selection); //Either forward and backward 
regexes work
                        return (match.Success && (match.Length == selection.Length));
        }
-       
+
        #endregion
 
 }
diff --git a/src/GnomeSubtitles/Core/SpellLanguage.cs b/src/GnomeSubtitles/Core/SpellLanguage.cs
index 8f1e142..4a44bd5 100644
--- a/src/GnomeSubtitles/Core/SpellLanguage.cs
+++ b/src/GnomeSubtitles/Core/SpellLanguage.cs
@@ -28,46 +28,46 @@ public class SpellLanguage : IComparable {
        private string id = null;
        private string name = null;
        private string prefixUnknown = Catalog.GetString("Unknown");
-       
+
        /* Static variables */
        private static string langGroupName = "lang";
        private static string countryGroupName = "country";
        private static Regex regex = new Regex(@"^(?<" + langGroupName + @">[a-zA-Z]+)(_(?<" + 
countryGroupName + @">[a-zA-Z]+))?$", RegexOptions.IgnoreCase);
-               
+
        public SpellLanguage (string id) {
                this.id = id;
                this.name = GetNameFromID(id);
        }
 
        /* Properties */
-       
+
        public string ID {
                get { return id; }
        }
-       
+
        public string Name {
                get { return name; }
        }
-       
+
        /* Public methods */
-       
+
        public override bool Equals (object o) {
                return ((o is SpellLanguage) && ((o as SpellLanguage).Name == this.name));
        }
-       
+
        public override int GetHashCode () {
                return this.name.GetHashCode();
        }
-       
+
        public int CompareTo (object o) {
                if (!(o is SpellLanguage))
                        throw new ArgumentException();
-               
+
                return this.name.CompareTo((o as SpellLanguage).Name);
-       } 
-       
+       }
+
        /* Private members */
-       
+
        private string GetNameFromID (string id) {
                string lang = null;
                string country = null;
@@ -75,11 +75,11 @@ public class SpellLanguage : IComparable {
 
                if (!parsed)
                        return GetUnknownNameFromID(id);
-               
+
                string builtID = lang;
                if ((country != null) && (country != String.Empty))
                        builtID += "-" + country;
-               
+
                CultureInfo info = null;
                try {
                        info = new CultureInfo(builtID);
@@ -89,22 +89,22 @@ public class SpellLanguage : IComparable {
                }
                return info.EnglishName;
        }
-       
+
        private string GetUnknownNameFromID (string id) {
                return prefixUnknown + " (" + id + ")";
        }
-       
+
        private bool ParseID (string id, ref string lang, ref string country) {
                Match match = regex.Match(id);
                if (!match.Success)
                        return false;
-               
+
                Group langGroup = match.Groups[langGroupName];
                if (!langGroup.Success)
                        return false;
-               
+
                lang = langGroup.Value;
-               
+
                Group countryGroup = match.Groups[countryGroupName];
                country = (countryGroup.Success ? countryGroup.Value : null);
                return true;
diff --git a/src/GnomeSubtitles/Core/SpellLanguages.cs b/src/GnomeSubtitles/Core/SpellLanguages.cs
index f796fd9..bb038bb 100644
--- a/src/GnomeSubtitles/Core/SpellLanguages.cs
+++ b/src/GnomeSubtitles/Core/SpellLanguages.cs
@@ -41,48 +41,48 @@ public class SpellLanguages {
                GetAvailableLanguages();
                GetEnabledFromConfig();
        }
-       
+
        /* Events */
        public event BasicEventHandler ToggleEnabled = null;
        public event BasicEventHandler TextLanguageChanged = null;
        public event BasicEventHandler TranslationLanguageChanged = null;
-       
-       
+
+
        /* Public members */
 
        public ArrayList Languages {
                get {
                        if (languages == null)
                                GetAvailableLanguages();
-                       
-                       return languages;               
+
+                       return languages;
                }
        }
-       
+
        public int ActiveTextLanguageIndex {
                get { return GetActiveLanguageIndex(SubtitleTextType.Text); }
        }
-       
+
        public int ActiveTranslationLanguageIndex {
                get { return GetActiveLanguageIndex(SubtitleTextType.Translation); }
        }
-       
+
        public SpellLanguage ActiveTextLanguage {
                get { return GetActiveLanguage(SubtitleTextType.Text); }
        }
-       
+
        public SpellLanguage ActiveTranslationLanguage {
                get { return GetActiveLanguage(SubtitleTextType.Translation); }
        }
-       
+
        public bool HasActiveTextLanguage {
                get { return ActiveTextLanguageIndex != -1; }
        }
-       
+
        public bool HasActiveTranslationLanguage {
                get { return ActiveTranslationLanguageIndex != -1; }
        }
-       
+
        public bool Enabled {
                set {
                        if (value != enabled) {
@@ -93,31 +93,31 @@ public class SpellLanguages {
                }
                get { return enabled; }
        }
-       
+
        public int GetActiveLanguageIndex (SubtitleTextType textType) {
                if (textType == SubtitleTextType.Text)
                        return activeTextLanguageIndex;
                else
                        return activeTranslationLanguageIndex;
        }
-       
+
        public SpellLanguage GetActiveLanguage (SubtitleTextType textType) {
                int index = GetActiveLanguageIndex(textType);
                return GetLanguage(index);
        }
-       
+
        public SpellLanguage GetLanguage (int index) {
                if ((index < 0) || (index >= languages.Count))
                        return null;
                else
                        return languages[index] as SpellLanguage;
        }
-       
+
        public void SetActiveLanguage (SubtitleTextType textType, string languageID) {
                int index = GetLanguageIndex(languageID);
                SetActiveLanguageIndex(textType, index);
        }
-               
+
        public void SetActiveLanguageIndex (SubtitleTextType textType, int index) {
                bool isEmpty = ((index < 0) || (index >= languages.Count));
 
@@ -126,9 +126,9 @@ public class SpellLanguages {
                        index = -1;
                else
                        activeLanguage = languages[index] as SpellLanguage;
-       
+
                System.Console.Error.WriteLine("Setting active language: " + (activeLanguage == null ? 
"none." : activeLanguage.ID));
-       
+
                /* Set index variable */
                if (textType == SubtitleTextType.Text)
                        activeTextLanguageIndex = index;
@@ -140,61 +140,61 @@ public class SpellLanguages {
 
                EmitLanguageChanged(textType);
        }
-       
+
        /* LibEnchant imports */
-       
+
        [DllImport ("libenchant")]
        static extern IntPtr enchant_broker_init ();
-       
+
        [DllImport ("libenchant")]
        static extern void enchant_broker_free (IntPtr broker);
-       
+
        [DllImport ("libenchant")]
        static extern void enchant_broker_list_dicts (IntPtr broker, LanguageListHandler cb, IntPtr userdata);
 
-       
+
        /* Private members */
-       
+
        private void GetAvailableLanguages () {
                if (languages == null)
                        Init();
-               
+
                FillLanguages();
                GetActiveLanguagesFromConfig();
        }
-       
+
        private void FillLanguages () {
                IntPtr broker = enchant_broker_init ();
                if (broker == IntPtr.Zero)
                        return;
-               
+
                enchant_broker_list_dicts (broker, languageListHandler, IntPtr.Zero);
-                       
+
                enchant_broker_free(broker);
-               
+
                languages.Sort();
                System.Console.Error.WriteLine("Got " + languages.Count + " languages.");
        }
-       
+
        private void GetActiveLanguagesFromConfig () {
                string activeTextLanguage = Base.Config.PrefsSpellCheckActiveTextLanguage;
                this.activeTextLanguageIndex = GetLanguageIndex(activeTextLanguage);
-               
+
                string activeTranslationLanguage = Base.Config.PrefsSpellCheckActiveTranslationLanguage;
                this.activeTranslationLanguageIndex = GetLanguageIndex(activeTranslationLanguage);
        }
-       
+
        private void GetEnabledFromConfig () {
                this.enabled = Base.Config.PrefsSpellCheckAutocheck;
        }
-       
+
        private void SetActiveLanguageInConfig (SubtitleTextType textType, string activeLanguage) {
                if (textType == SubtitleTextType.Text)
                        Base.Config.PrefsSpellCheckActiveTextLanguage = activeLanguage;
                else
                        Base.Config.PrefsSpellCheckActiveTranslationLanguage = activeLanguage;
        }
-       
+
        private int GetLanguageIndex (string languageID) {
                for (int index = 0 ; index < languages.Count ; index++) {
                        SpellLanguage language = languages[index] as SpellLanguage;
@@ -203,38 +203,38 @@ public class SpellLanguages {
                }
                return -1;
        }
-       
+
        private void Init () {
                languages = new ArrayList();
                activeTextLanguageIndex = -1;
                activeTranslationLanguageIndex = -1;
        }
-       
+
        /* Event members */
-       
+
        private void OnLanguageList (string langTag, string providerName, string providerDesc, string 
providerFile, IntPtr userdata) {
                SpellLanguage language = new SpellLanguage(langTag);
                if (!languages.Contains(language))
                        languages.Add(language);
        }
-       
+
        private void EmitToggleEnabled () {
        if (this.ToggleEnabled != null)
                this.ToggleEnabled();
     }
-    
+
     private void EmitLanguageChanged (SubtitleTextType textType) {
        if (textType == SubtitleTextType.Text)
                EmitTextLanguageChanged();
        else
                EmitTranslationLanguageChanged();
     }
-    
+
     private void EmitTextLanguageChanged () {
        if (this.TextLanguageChanged != null)
                this.TextLanguageChanged();
     }
-    
+
     private void EmitTranslationLanguageChanged () {
        if (this.TranslationLanguageChanged != null)
                this.TranslationLanguageChanged();
diff --git a/src/GnomeSubtitles/Core/SyncPoints.cs b/src/GnomeSubtitles/Core/SyncPoints.cs
index 1108c44..da81a2f 100644
--- a/src/GnomeSubtitles/Core/SyncPoints.cs
+++ b/src/GnomeSubtitles/Core/SyncPoints.cs
@@ -26,14 +26,14 @@ namespace GnomeSubtitles.Core {
 public class SyncPoints {
        private ListStore model = new ListStore(typeof(SyncPoint));
        private SubLib.Core.Domain.SyncPoints collection = new SubLib.Core.Domain.SyncPoints();
-       
-       
+
+
        public SyncPoints () : base() {
                LoadModelFromCollection();
        }
-       
+
        /* Indexers */
-       
+
        public SyncPoint this [TreeIter iter] {
                get { return model.GetValue(iter, 0) as SyncPoint; }
        }
@@ -41,19 +41,19 @@ public class SyncPoints {
        public SyncPoint this [TreePath path] {
                get { return collection[path.Indices[0]]; }
        }
-       
+
        /* Public properties */
 
        public ListStore Model {
                get { return model; }
        }
-       
+
        public SubLib.Core.Domain.SyncPoints Collection {
                get { return collection; }
        }
-       
+
        /* Public methods */
-       
+
        public int Add (SyncPoint syncPoint) {
                bool didReplace = collection.Add(syncPoint);
                int index = collection.IndexOf(syncPoint);
@@ -70,21 +70,21 @@ public class SyncPoints {
                        return index;
                }
        }
-       
+
        public void Remove (TreePath[] paths) {
                foreach (TreePath path in paths) {
                        TreeIter iter;
                        model.GetIter(out iter, path);
                        model.Remove(ref iter);
-                       
+
                        collection.Remove(Util.PathToInt(path));
                }
        }
-       
+
        public IEnumerator GetEnumerator () {
                return collection.GetEnumerator();
        }
-       
+
 
        /* Private members */
 
@@ -94,18 +94,18 @@ public class SyncPoints {
                        model.AppendValues(syncPoint);
                }
        }
-       
-               
+
+
        private void Insert (int index, SyncPoint syncPoint) {
                model.SetValue(model.Insert(index), 0, syncPoint);
        }
-       
+
        private void Replace (int index, SyncPoint syncPoint) {
                TreeIter iter;
                model.GetIterFromString(out iter, index.ToString());
                model.SetValue(iter, 0, syncPoint);
        }
-       
+
        private void Append (SyncPoint syncPoint) {
                model.AppendValues(syncPoint);
        }
diff --git a/src/GnomeSubtitles/Core/Util.cs b/src/GnomeSubtitles/Core/Util.cs
index 013b638..9467d52 100644
--- a/src/GnomeSubtitles/Core/Util.cs
+++ b/src/GnomeSubtitles/Core/Util.cs
@@ -28,31 +28,31 @@ namespace GnomeSubtitles.Core {
 
 public class Util {
        public static int SpinButtonTimeWidthChars = 11; //00:00:00.000 actually has 12 chars, but some have 
lower width
-  
+
        //TODO move to other util?
        public static int ColumnWidth (Widget widget, string text) {
                int margins = 10;
-               return TextWidth(widget, text, margins); 
+               return TextWidth(widget, text, margins);
     }
-    
+
     public static TreeViewColumn CreateTreeViewColumn (string title, int width, CellRenderer cell, 
TreeCellDataFunc dataFunction) {
                cell.Xalign = 0.5f;
                cell.Yalign = 0;
                TreeViewColumn column = new TreeViewColumn();
                column.Alignment = 0.5f;
                column.Title = title;
-               
+
                if (width != -1) {
                        column.FixedWidth = width;
                        column.Sizing = TreeViewColumnSizing.Fixed;
                }
-               
+
                column.Resizable = true;
                column.PackStart(cell, true);
                column.SetCellDataFunc(cell, dataFunction);
                return column;
        }
-  
+
        //TODO stop using this? Doesn't seem to be working for spin buttons anymore (which were updated OTM)
     public static int TextWidth (Widget widget, string text, int margins) {
        Pango.Layout layout = widget.CreatePangoLayout(text);
@@ -60,7 +60,7 @@ public class Util {
        layout.GetPixelSize(out width, out height);
        return width + margins;
     }
-    
+
     /// <summary>Converts a timespan to a text representation.</summary>
     /// <remarks>The resulting string is in the format [-]hh:mm:ss.fff. This format is accepted by
     /// <see cref="TimeSpan.Parse" />.</remarks>
@@ -71,19 +71,19 @@ public class Util {
                        time.Hours.ToString("00;00") + ":" + time.Minutes.ToString("00;00") +
                        ":" + time.Seconds.ToString("00;00") + "." + time.Milliseconds.ToString("000;000");
        }
-       
+
        public static string SecondsToTimeText (double seconds) {
                return TimeSpanToText(TimeSpan.FromSeconds(seconds));
        }
-       
+
        public static string MillisecondsToTimeText (int milliseconds) {
                return TimeSpanToText(TimeSpan.FromMilliseconds(milliseconds));
        }
-       
+
        public static int TimeTextToMilliseconds (string text) {
-               return (int)TimeSpan.Parse(text).TotalMilliseconds;     
+               return (int)TimeSpan.Parse(text).TotalMilliseconds;
        }
-       
+
        public static void OnTimeInput (object o, InputArgs args) {
                SpinButton spinButton = o as SpinButton;
                try {
@@ -94,13 +94,13 @@ public class Util {
                }
                args.RetVal = 1;
        }
-       
+
        public static void OnTimeOutput (object o, OutputArgs args) {
                SpinButton spinButton = o as SpinButton;
                spinButton.Text = MillisecondsToTimeText((int)spinButton.Value);
                args.RetVal = 1;
        }
-       
+
        public static void SetSpinButtonTimingMode (SpinButton spinButton, TimingMode timingMode) {
                if (timingMode == TimingMode.Frames) {
                        spinButton.Numeric = true;
@@ -113,26 +113,26 @@ public class Util {
                        spinButton.Output += OnTimeOutput;
                }
        }
-       
+
        public static void SetSpinButtonAdjustment (SpinButton spinButton, TimeSpan upperLimit, bool 
canNegate) {
                spinButton.Adjustment.StepIncrement = Base.Config.PrefsTimingsTimeStep; //milliseconds
                spinButton.Adjustment.Upper = (upperLimit != TimeSpan.Zero ? upperLimit.TotalMilliseconds : 
86399999);
-               spinButton.Adjustment.Lower = (canNegate ? -spinButton.Adjustment.Upper : 0); 
+               spinButton.Adjustment.Lower = (canNegate ? -spinButton.Adjustment.Upper : 0);
        }
-       
+
        public static void SetSpinButtonAdjustment (SpinButton spinButton, int upperLimit, bool canNegate) {
                spinButton.Adjustment.StepIncrement = Base.Config.PrefsTimingsFramesStep; //frames
                spinButton.Adjustment.Upper = (upperLimit != 0 ? upperLimit : 3000000);
-               spinButton.Adjustment.Lower = (canNegate ? -spinButton.Adjustment.Upper : 0); 
+               spinButton.Adjustment.Lower = (canNegate ? -spinButton.Adjustment.Upper : 0);
        }
-       
+
        public static void SetSpinButtonMaxAdjustment (SpinButton spinButton, TimingMode timingMode, bool 
toNegate) {
                if (timingMode == TimingMode.Times)
                        SetSpinButtonAdjustment(spinButton, TimeSpan.Zero, toNegate);
                else
                        SetSpinButtonAdjustment(spinButton, 0, toNegate);
        }
-       
+
        public static void OpenUrl (string url) {
                if ((url == null) || (url == String.Empty))
                        return;
@@ -144,7 +144,7 @@ public class Util {
                        Console.Error.WriteLine("Caught exception when trying to open url [{0}]: {1}", url, 
e);
                }
        }
-       
+
        public static void OpenSendEmail (string email) {
                OpenUrl("mailto:"; + email);
        }
@@ -152,11 +152,11 @@ public class Util {
        public static void OpenBugReport () {
                OpenUrl("http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-subtitles";);
        }
-       
+
        public static bool IsPathValid (TreePath path) {
                if (path == null)
                        return false;
-               
+
                try {
                        if ((path.Indices == null) || (path.Indices.Length == 0))
                                return false;
@@ -164,25 +164,25 @@ public class Util {
                catch (Exception) {
                        return false;
                }
-               
+
                return true;
        }
-       
+
        /// <summary>Returns the index of a <see cref="TreePath" />.</summary>
        public static int PathToInt (TreePath path) {
                return path.Indices[0];
        }
-       
+
        /// <summary>Returns a <see cref="TreePath" /> corresponding to the specified index.</summary>
        public static TreePath IntToPath (int index) {
                return new TreePath(index.ToString());
        }
-       
+
        /// <summary>Returns an array of <see cref="TreePath" /> from an array of ints.</summary>
        public static TreePath[] IntsToPaths (int[] indices) {
                if (indices == null)
                        return null;
-               
+
                int length = indices.Length;
                TreePath[] paths = new TreePath[length];
                for (int position = 0 ; position < length ; position++) {
@@ -192,13 +192,13 @@ public class Util {
                }
                return paths;
        }
-       
+
        /// <summary>Returns the path that succeeds the specified path.</summary>
        public static TreePath PathNext (TreePath path) {
                int newIndex = PathToInt(path) + 1;
                return new TreePath(newIndex.ToString());
        }
-       
+
        /// <summary>Returns the path that precedes the specified path.</summary>
        public static TreePath PathPrevious (TreePath path) {
                int newIndex = PathToInt(path) - 1;
@@ -207,9 +207,9 @@ public class Util {
 
        /// <summary>Checks whether two path are equal. They are considered equal if they have the same 
indice.</summary>
        public static bool PathsAreEqual (TreePath path1, TreePath path2) {
-               return (path1.Compare(path2) == 0);     
+               return (path1.Compare(path2) == 0);
        }
-       
+
        /// <summary>Quotes a filename.</summary>
        /// <returns>The filename, starting and ending with quotation marks.</returns>
        /// <remarks>If the filename contains quotation marks itself, they are escapted.
@@ -217,12 +217,12 @@ public class Util {
                string escapedFilename = filename.Replace("\"", "\\\""); //Replaces " with \"
                return "\"" + escapedFilename + "\"";
        }
-       
+
        /// <summary>Returns the invariant culture string of a number.</summary>
        public static string ToString (float number) {
                return number.ToString(NumberFormatInfo.InvariantInfo);
        }
-       
+
        public static string GetFormattedText (string text, params object[] args) {
                if ((args == null) || (args.Length == 0))
                        return text;
diff --git a/src/GnomeSubtitles/Dialog/AboutDialog.cs b/src/GnomeSubtitles/Dialog/AboutDialog.cs
index 95cab41..133b54f 100644
--- a/src/GnomeSubtitles/Dialog/AboutDialog.cs
+++ b/src/GnomeSubtitles/Dialog/AboutDialog.cs
@@ -29,32 +29,32 @@ public class AboutDialog : GladeDialog {
        /* Constant strings */
        private const string gladeFilename = "AboutDialog.glade";
        private const string logoFilename = "gnome-subtitles-logo.png";
-       
+
 
        public AboutDialog () {
                SetHooks();
                Init(gladeFilename, true);
-       
+
                dialog = GetDialog() as Gtk.AboutDialog;
                SetInfo();
        }
-       
+
        /* Private members */
-       
+
        /// <summary>Sets the Url and Email hooks. These must be set before the dialog is realized.</summary>
        private void SetHooks () {
                Gtk.AboutDialog.SetUrlHook(AboutDialogOpenUrl);
                Gtk.AboutDialog.SetEmailHook(AboutDialogOpenEmail);
        }
-       
+
        private void AboutDialogOpenUrl (Gtk.AboutDialog about, string url) {
                Core.Util.OpenUrl(url);
        }
-       
+
        private void AboutDialogOpenEmail (Gtk.AboutDialog about, string email) {
                Core.Util.OpenSendEmail(email);
        }
-       
+
        private void SetInfo () {
                dialog.Version = Base.ExecutionContext.Version;
                dialog.Logo = new Gdk.Pixbuf(null, logoFilename);
diff --git a/src/GnomeSubtitles/Dialog/BaseDialog.cs b/src/GnomeSubtitles/Dialog/BaseDialog.cs
index b937b75..542cca7 100644
--- a/src/GnomeSubtitles/Dialog/BaseDialog.cs
+++ b/src/GnomeSubtitles/Dialog/BaseDialog.cs
@@ -23,7 +23,7 @@ using System;
 namespace GnomeSubtitles.Dialog {
 
 public abstract class BaseDialog {
-       
+
        private Gtk.Dialog dialog = null;
        private bool returnValue = false;
 
@@ -31,7 +31,7 @@ public abstract class BaseDialog {
        }
 
        /* Events */
-       
+
        public event EventHandler Destroyed;
 
 
@@ -43,7 +43,7 @@ public abstract class BaseDialog {
 
        public virtual bool Visible {
                get { return dialog.Visible; }
-               set { 
+               set {
                        if (value)
                                Show();
                        else
@@ -66,7 +66,7 @@ public abstract class BaseDialog {
                EmitDestroyedEvent();
        }
 
-       
+
 
        //TODO check if this is needed
        public virtual bool WaitForResponse () {
@@ -84,7 +84,7 @@ public abstract class BaseDialog {
        protected void Init (Gtk.Dialog dialog) {
                this.dialog = dialog;
                Util.SetBaseWindowFromUi(dialog);
-               
+
                dialog.Response += OnResponse;
                dialog.DeleteEvent += OnDeleteEvent;
        }
@@ -97,7 +97,7 @@ public abstract class BaseDialog {
                this.returnValue = returnValue;
        }
 
-       
+
        /* Event members */
 
        protected void OnResponse (object o, ResponseArgs args) {
@@ -121,7 +121,7 @@ public abstract class BaseDialog {
                if (Destroyed != null) {
                        Destroyed(this, EventArgs.Empty);
                }
-       }       
+       }
 
 
 }
diff --git a/src/GnomeSubtitles/Dialog/DialogScope.cs b/src/GnomeSubtitles/Dialog/DialogScope.cs
index f663b0d..8e367e9 100644
--- a/src/GnomeSubtitles/Dialog/DialogScope.cs
+++ b/src/GnomeSubtitles/Dialog/DialogScope.cs
@@ -26,13 +26,13 @@ public enum DialogScope {
 
        /// <summary>The dialog is active until it's closed.</summary>
        Singleton,
-       
+
        /// <summary>The dialog is active until the document is closed.</summary>
        Document,
 
        /// <summary>The dialog is active until the video is closed.</summary>
        Video,
-       
+
        /// <summary>The dialog is active until the application is closed.</summary>
        Application
 }
diff --git a/src/GnomeSubtitles/Dialog/EncodingsDialog.cs b/src/GnomeSubtitles/Dialog/EncodingsDialog.cs
index 4e2d5fd..42e4e90 100644
--- a/src/GnomeSubtitles/Dialog/EncodingsDialog.cs
+++ b/src/GnomeSubtitles/Dialog/EncodingsDialog.cs
@@ -37,7 +37,7 @@ public class EncodingsDialog : GladeDialog {
        const int nameColumnNum = 1; //The number of the Name column
 
        /* Widgets */
-       
+
        [WidgetAttribute] private TreeView availableTreeView = null;
        [WidgetAttribute] private TreeView shownTreeView = null;
        [WidgetAttribute] private Button buttonAdd = null;
@@ -46,21 +46,21 @@ public class EncodingsDialog : GladeDialog {
        public EncodingsDialog () : base(gladeFilename) {
                FillAvailableEncodings();
                FillShownEncodings();
-               
+
                ConnectSignals();
        }
-       
+
        /* Public properties */
-       
+
        public string[] ChosenNames {
                get { return chosenNames; }
        }
-       
+
        /* Private members */
-       
+
        private void FillAvailableEncodings () {
                SetColumns(availableTreeView);
-               
+
                ListStore store = new ListStore(typeof(string), typeof(string));
                foreach (EncodingDescription desc in Encodings.All) {
                        store.AppendValues(desc.Description, desc.Name);
@@ -68,12 +68,12 @@ public class EncodingsDialog : GladeDialog {
 
                SetModel(availableTreeView, store);
        }
-       
+
        private void FillShownEncodings () {
                SetColumns(shownTreeView);
-               
+
                chosenNames = Base.Config.PrefsEncodingsShownInMenu;
-               
+
                ListStore store = new ListStore(typeof(string), typeof(string));
                foreach (string shownEncoding in chosenNames) {
                        EncodingDescription desc = EncodingDescription.Empty;
@@ -83,34 +83,34 @@ public class EncodingsDialog : GladeDialog {
 
                SetModel(shownTreeView, store);
        }
-       
+
        private void SetColumns (TreeView tree) {
                TreeViewColumn descriptionColumn = new TreeViewColumn(Catalog.GetString("Description"), new 
CellRendererText(), "text", descColumnNum);
                descriptionColumn.SortColumnId = descColumnNum;
                tree.AppendColumn(descriptionColumn);
-               
+
                TreeViewColumn nameColumn = new TreeViewColumn(Catalog.GetString("Encoding"), new 
CellRendererText(), "text", nameColumnNum);
                nameColumn.SortColumnId = nameColumnNum;
                tree.AppendColumn(nameColumn);
        }
-       
+
        private void SetModel (TreeView tree, ListStore store) {
                TreeModelSort storeSort = new TreeModelSort(store);
                storeSort.SetSortColumnId(descColumnNum, SortType.Ascending);
                tree.Model = storeSort;
        }
-       
+
        private void AddSelectedAvailableEncoding () {
                TreePath path = GetSelectedPath(availableTreeView);
                if (path == null)
                        return;
-               
+
                int encodingNumber = Core.Util.PathToInt(path);
                EncodingDescription desc = Encodings.All[encodingNumber];
-               
-               AddToShownEncodings(desc);      
+
+               AddToShownEncodings(desc);
        }
-       
+
        private void RemoveSelectedShownEncoding () {
                TreeIter iter = new TreeIter();
                if (GetSelectedIter(shownTreeView, ref iter)) {
@@ -118,14 +118,14 @@ public class EncodingsDialog : GladeDialog {
                        UpdateShownEncodingsPrefs();
                }
        }
-       
+
        private void AddToShownEncodings (EncodingDescription desc) {
                if (!IsAlreadyShown(desc.Name)) {
                        GetListStore(shownTreeView).AppendValues(desc.Description, desc.Name);
                        UpdateShownEncodingsPrefs();
                }
        }
-       
+
        private string[] GetShownNames () {
                ListStore store = GetListStore(shownTreeView);
                int count = store.IterNChildren();
@@ -136,9 +136,9 @@ public class EncodingsDialog : GladeDialog {
                        names[rowNumber] = row[nameColumnNum] as string;
                        rowNumber++;
                }
-               return names;   
+               return names;
        }
-       
+
        private bool IsAlreadyShown (string name) {
                ListStore store = GetListStore(shownTreeView);
                foreach (object[] row in store) {
@@ -151,69 +151,69 @@ public class EncodingsDialog : GladeDialog {
                }
                return false;
        }
-       
+
        private ListStore GetListStore (TreeView tree) {
                return (tree.Model as TreeModelSort).Model as ListStore;
        }
-       
+
        private bool GetSelectedIter (TreeView tree, ref TreeIter iter) {
                TreePath path = GetSelectedPath(tree);
                if (path == null)
                        return false;
-               
+
                return GetListStore(tree).GetIter(out iter, path);
        }
-       
+
        private TreePath GetSelectedPath (TreeView tree) {
                TreePath[] paths = tree.Selection.GetSelectedRows();
                if ((paths == null) || (paths.Length != 1))
                        return null;
 
                TreePath selected = paths[0];
-               return (tree.Model as TreeModelSort).ConvertPathToChildPath(selected);  
+               return (tree.Model as TreeModelSort).ConvertPathToChildPath(selected);
        }
-               
+
        private void UpdateShownEncodingsPrefs () {
                chosenNames = GetShownNames();
                Base.Config.PrefsEncodingsShownInMenu = chosenNames;
        }
-       
-       
+
+
        /* Event related members */
-       
+
        private void ConnectSignals () {
                availableTreeView.Selection.Changed += OnAvailableSelectionChanged;
                shownTreeView.Selection.Changed += OnShownSelectionChanged;
        }
-       
+
        #pragma warning disable 169             //Disables warning about handlers not being used
-       
+
        private void OnAvailableSelectionChanged (object o, EventArgs args) {
                bool sensitive = (availableTreeView.Selection.CountSelectedRows() == 1);
                buttonAdd.Sensitive = sensitive;
        }
-       
+
        private void OnShownSelectionChanged (object o, EventArgs args) {
                bool sensitive = (shownTreeView.Selection.CountSelectedRows() == 1);
                buttonRemove.Sensitive = sensitive;
        }
-       
+
        private void OnAvailableRowActivated (object o, RowActivatedArgs args) {
                AddSelectedAvailableEncoding();
        }
-               
+
        private void OnAdd (object o, EventArgs args) {
                AddSelectedAvailableEncoding();
        }
-       
+
        private void OnRemove (object o, EventArgs args) {
                RemoveSelectedShownEncoding();
        }
-       
+
        private void OnShownRowActivated (object o, RowActivatedArgs args) {
                RemoveSelectedShownEncoding();
        }
-       
+
 }
 
 }
diff --git a/src/GnomeSubtitles/Dialog/FileOpenDialog.cs b/src/GnomeSubtitles/Dialog/FileOpenDialog.cs
index b7be207..11b3840 100644
--- a/src/GnomeSubtitles/Dialog/FileOpenDialog.cs
+++ b/src/GnomeSubtitles/Dialog/FileOpenDialog.cs
@@ -52,11 +52,11 @@ public class FileOpenDialog : GladeDialog {
        [WidgetAttribute] private ComboBox fileEncodingComboBox = null;
        [WidgetAttribute] private ComboBox videoComboBox = null;
        [WidgetAttribute] private Label videoLabel = null;
-       
-       
+
+
        public FileOpenDialog () : this(true, Catalog.GetString("Open File")) {
        }
-       
+
        protected FileOpenDialog (bool toEnableVideo, string title) : base(gladeFilename) {
                dialog = GetDialog() as FileChooserDialog;
                dialog.Title = title;
@@ -65,7 +65,7 @@ public class FileOpenDialog : GladeDialog {
 
                if (toEnableVideo)
                        EnableVideo();
-       
+
                string startFolder = GetStartFolder();
                dialog.SetCurrentFolder(startFolder);
 
@@ -104,18 +104,18 @@ public class FileOpenDialog : GladeDialog {
        public string Filename {
                get { return chosenFilename; }
        }
-       
+
        public bool HasVideoFilename {
                get { return chosenVideoUri != null; }
        }
-       
+
        public Uri VideoUri {
                get { return chosenVideoUri; }
        }
 
 
        /* Protected members */
-       
+
        protected virtual string GetStartFolder () {
                if (Base.IsDocumentLoaded && Base.Document.TextFile.IsPathRooted)
                        return Base.Document.TextFile.Directory;
@@ -125,7 +125,7 @@ public class FileOpenDialog : GladeDialog {
 
 
        /* Private members */
-       
+
        private void FillVideoComboBoxBasedOnCurrentFolder () {
                videoFiles = null;
                videoFilenames = null;
@@ -141,7 +141,7 @@ public class FileOpenDialog : GladeDialog {
                        SetVideoSelectionSensitivity(false);
                        return;
                }
-                       
+
                if ((folder == null) || (folder == String.Empty)) {
                        System.Console.Error.WriteLine("Error when trying to get the current folder.");
                        SetVideoSelectionSensitivity(false);
@@ -156,25 +156,25 @@ public class FileOpenDialog : GladeDialog {
                }
                else
                        SetVideoSelectionSensitivity(true);
-                               
+
                videoFiles.Sort();
                videoFilenames = new ArrayList();
                foreach (string file in videoFiles) {
                        string filename = Path.GetFileName(file);
                        videoComboBox.AppendText(filename);
-                       
+
                        videoFilenames.Add(FilenameWithoutExtension(filename));
                }
-               
+
                videoComboBox.PrependText("-");
                videoComboBox.PrependText(Catalog.GetString("None"));
                videoComboBox.Active = 0;
        }
-       
+
        private void SetActiveVideoFile () {
                if ((videoFiles == null) || (videoFiles.Count == 0))
                        return;
-               
+
                string filePath = String.Empty;
                try {
                        filePath = dialog.Filename;
@@ -185,20 +185,20 @@ public class FileOpenDialog : GladeDialog {
                        SetActiveComboBoxItem(0);
                        return;
                }
-               
+
                if ((filePath == null) || (filePath == String.Empty) || (!File.Exists(filePath))) {
                        SetActiveComboBoxItem(0);
                        return;
                }
-               
+
                string filename = Path.GetFileNameWithoutExtension(filePath);
                if ((filename == String.Empty) || (filename == null)) {
                        SetActiveComboBoxItem(0);
                        return;
                }
-               
+
                int activeVideoFile = 0;
-               
+
                for (int count = 0 ; count < videoFilenames.Count ; count++) {
                        string videoFilename = videoFilenames[count] as string;
                        if (filename.Equals(videoFilename)) {
@@ -206,18 +206,18 @@ public class FileOpenDialog : GladeDialog {
                                break;
                        }
                }
-               SetActiveComboBoxItem(activeVideoFile);         
+               SetActiveComboBoxItem(activeVideoFile);
        }
-       
+
        private void SetActiveComboBoxItem (int item) {
                videoComboBox.Active = item;
        }
-       
+
        private void SetVideoSelectionSensitivity (bool sensitivity) {
                videoComboBox.Sensitive = sensitivity;
                videoLabel.Sensitive = sensitivity;
        }
-       
+
        private string FilenameWithoutExtension (string filename) {
                int index = filename.LastIndexOf('.');
                if (index != -1)
@@ -225,37 +225,37 @@ public class FileOpenDialog : GladeDialog {
                else
                        return filename;
        }
-       
+
        private void EnableVideo () {
                videoLabel.Visible = true;
                videoComboBox.Visible = true;
-               
+
                autoChooseVideoFile = Base.Config.PrefsVideoAutoChooseFile;
                videoComboBox.RowSeparatorFunc = ComboBoxUtil.SeparatorFunc;
-               
+
                dialog.CurrentFolderChanged += OnCurrentFolderChanged;
                dialog.SelectionChanged += OnSelectionChanged;
        }
-       
+
        private void SetFilters () {
                SubtitleTypeInfo[] types = Subtitles.AvailableTypesSorted;
                FileFilter[] filters = new FileFilter[types.Length + 2];
                int filterPosition = 0;
-               
+
                /* First filter corresponds to all files */
                FileFilter allFilesFilter = new FileFilter();
                allFilesFilter.Name = Catalog.GetString("All Files");
                allFilesFilter.AddPattern("*");
                filters[filterPosition] = allFilesFilter;
                filterPosition++;
-               
+
                /* Second filter corresponds to all subtitle files */
                FileFilter subtitleFilesFilter = new FileFilter();
                subtitleFilesFilter.Name = Catalog.GetString("All Subtitle Files");
                subtitleFilesFilter.AddPattern("*.txt");
                filters[filterPosition] = subtitleFilesFilter;
                filterPosition++;
-               
+
                /* Remaining filters correspond to the subtitle types */
                foreach (SubtitleTypeInfo type in types) {
                        FileFilter filter = new FileFilter();
@@ -268,14 +268,14 @@ public class FileOpenDialog : GladeDialog {
                        filters[filterPosition] = filter;
                        filterPosition++;
                }
-               
+
                foreach (FileFilter filter in filters)
                        dialog.AddFilter(filter);
-               
+
                dialog.Filter = subtitleFilesFilter;
        }
-       
-       
+
+
        #pragma warning disable 169             //Disables warning about handlers not being used
 
        protected override bool ProcessResponse (ResponseType response) {
@@ -295,21 +295,21 @@ public class FileOpenDialog : GladeDialog {
                        if (videoComboBox.Active > 0) {
                                int videoFileIndex = videoComboBox.Active - 2;
                                chosenVideoUri = new Uri("file://" + videoFiles[videoFileIndex] as string);
-                       }                       
+                       }
                        SetReturnValue(true);
                }
                return false;
        }
-       
+
        private void OnCurrentFolderChanged (object o, EventArgs args) {
                FillVideoComboBoxBasedOnCurrentFolder();
        }
-       
+
        private void OnSelectionChanged (object o, EventArgs args) {
                if (autoChooseVideoFile)
                        SetActiveVideoFile();
        }
-       
+
 }
 
 }
diff --git a/src/GnomeSubtitles/Dialog/FilePropertiesDialog.cs 
b/src/GnomeSubtitles/Dialog/FilePropertiesDialog.cs
index d708263..8c7dee5 100644
--- a/src/GnomeSubtitles/Dialog/FilePropertiesDialog.cs
+++ b/src/GnomeSubtitles/Dialog/FilePropertiesDialog.cs
@@ -39,37 +39,37 @@ public class FilePropertiesDialog : GladeDialog {
        [WidgetAttribute] private Label encodingValueLabel = null;
        [WidgetAttribute] private Label subtitleFormatValueLabel = null;
        [WidgetAttribute] private Label timingModeValueLabel = null;
-       
+
        public FilePropertiesDialog () : base(gladeFilename) {
                FillLabelValues();
        }
-       
+
        /* Private methods */
-       
+
        private void FillLabelValues () {
                FileProperties properties = Base.Document.TextFile;
-               
+
                FillName(properties.Filename);
                FillPath(properties.Directory);
                FillEncoding(properties.Encoding);
                FillSubtitleFormat(properties.SubtitleType);
                FillTimingMode(properties.TimingMode);
        }
-       
+
        private void FillName (string name) {
                if (name == String.Empty)
                        name = Catalog.GetString("Unknown");
 
                nameValueLabel.Text = name;
        }
-       
+
        private void FillPath (string path) {
                if (path == String.Empty)
                        path = Catalog.GetString("Unknown");
 
                pathValueLabel.Text = path;
        }
-       
+
        private void FillEncoding (Encoding encoding) {
                string encodingName = String.Empty;
                if (encoding == null)
@@ -79,10 +79,10 @@ public class FilePropertiesDialog : GladeDialog {
                        if ((encodingName == null) || (encodingName == String.Empty))
                                encodingName = Catalog.GetString("Unknown");
                }
-               
+
                encodingValueLabel.Text = encodingName;
        }
-       
+
        private void FillSubtitleFormat (SubtitleType type) {
                string format = String.Empty;
                if (type == SubtitleType.Unknown)
@@ -91,14 +91,14 @@ public class FilePropertiesDialog : GladeDialog {
                        SubtitleTypeInfo typeInfo = Subtitles.GetAvailableType(type);
                        format = typeInfo.Name;
                }
-               
+
                subtitleFormatValueLabel.Text = format;
        }
-       
+
        private void FillTimingMode (TimingMode mode) {
                timingModeValueLabel.Text = mode.ToString();
        }
-       
+
 }
 
 }
\ No newline at end of file
diff --git a/src/GnomeSubtitles/Dialog/FileSaveAsDialog.cs b/src/GnomeSubtitles/Dialog/FileSaveAsDialog.cs
index 7f66e2e..950f808 100644
--- a/src/GnomeSubtitles/Dialog/FileSaveAsDialog.cs
+++ b/src/GnomeSubtitles/Dialog/FileSaveAsDialog.cs
@@ -22,7 +22,7 @@ using SubLib.Core.Domain;
 namespace GnomeSubtitles.Dialog {
 
 public class FileSaveAsDialog : SubtitleFileSaveAsDialog {
-       
+
        public FileSaveAsDialog () : base(SubtitleTextType.Text) {
        }
 
diff --git a/src/GnomeSubtitles/Dialog/FileTranslationOpenDialog.cs 
b/src/GnomeSubtitles/Dialog/FileTranslationOpenDialog.cs
index f12c726..8c16fdf 100644
--- a/src/GnomeSubtitles/Dialog/FileTranslationOpenDialog.cs
+++ b/src/GnomeSubtitles/Dialog/FileTranslationOpenDialog.cs
@@ -23,12 +23,12 @@ using Mono.Unix;
 namespace GnomeSubtitles.Dialog {
 
 public class FileTranslationOpenDialog : FileOpenDialog {
-       
+
        public FileTranslationOpenDialog () : base(false, Catalog.GetString("Open Translation File")) {
        }
-       
+
        /* Public members */
-       
+
        protected override string GetStartFolder () {
                if (Base.IsDocumentLoaded && Base.Document.IsTranslationLoaded && 
Base.Document.HasTranslationFileProperties && Base.Document.TranslationFile.IsPathRooted)
                        return Base.Document.TranslationFile.Directory;
diff --git a/src/GnomeSubtitles/Dialog/GladeDialog.cs b/src/GnomeSubtitles/Dialog/GladeDialog.cs
index 63133f4..dca4aca 100644
--- a/src/GnomeSubtitles/Dialog/GladeDialog.cs
+++ b/src/GnomeSubtitles/Dialog/GladeDialog.cs
@@ -40,17 +40,17 @@ public abstract class GladeDialog : BaseDialog {
        protected GladeDialog (string filename, bool autoconnect) {
                Init(filename, autoconnect);
        }
-       
+
        /* Protected members */
-       
-       /// <summary>Constructs the dialog with the specified filename, and possibly sets it as 
persistent.</param> 
+
+       /// <summary>Constructs the dialog with the specified filename, and possibly sets it as 
persistent.</param>
        /// <param name="filename">The filename of the dialog.</param>
        /// <param name="autoconnect">Whether to autoconnect the event handlers.</param>
        /// <remarks>Constructing creates the dialog from its filename, autoconnects the handlers,
        /// sets the icon and also sets the dialog as transient for the main window.</summary>
        protected void Init (string filename, bool autoconnect) {
                glade = new Glade.XML(null, filename, null, Base.ExecutionContext.TranslationDomain);
-               
+
                if (autoconnect)
                        Autoconnect();
                else
diff --git a/src/GnomeSubtitles/Dialog/HeadersDialog.cs b/src/GnomeSubtitles/Dialog/HeadersDialog.cs
index 7e5dfa2..0893166 100644
--- a/src/GnomeSubtitles/Dialog/HeadersDialog.cs
+++ b/src/GnomeSubtitles/Dialog/HeadersDialog.cs
@@ -34,7 +34,7 @@ public class HeadersDialog : GladeDialog {
        private const string mpSubVideoTag = "VIDEO";
 
        /* Widgets */
-       
+
        /* KaraokeLyricsLRC fields */
        [WidgetAttribute] private Entry entryKaraokeLRCTitle = null;
        [WidgetAttribute] private Entry entryKaraokeLRCAuthor = null;
@@ -70,7 +70,7 @@ public class HeadersDialog : GladeDialog {
        [WidgetAttribute] private SpinButton spinButtonSSAASSPlayResX = null;
        [WidgetAttribute] private SpinButton spinButtonSSAASSPlayResY = null;
        [WidgetAttribute] private SpinButton spinButtonSSAASSPlayDepth = null;
-       
+
        /* SubViewer1 fields */
        [WidgetAttribute] private Entry entrySubViewer1Title = null;
        [WidgetAttribute] private Entry entrySubViewer1Author = null;
@@ -79,7 +79,7 @@ public class HeadersDialog : GladeDialog {
        [WidgetAttribute] private Entry entrySubViewer1FilePath = null;
        [WidgetAttribute] private SpinButton spinButtonSubViewer1Delay = null;
        [WidgetAttribute] private SpinButton spinButtonSubViewer1CDTrack = null;
-       
+
        /* SubViewer2 fields */
        [WidgetAttribute] private Entry entrySubViewer2Title = null;
        [WidgetAttribute] private Entry entrySubViewer2Author = null;
@@ -93,16 +93,16 @@ public class HeadersDialog : GladeDialog {
        [WidgetAttribute] private SpinButton spinButtonSubViewer2Delay = null;
        [WidgetAttribute] private SpinButton spinButtonSubViewer2CDTrack = null;
        [WidgetAttribute] private SpinButton spinButtonSubViewer2FontSize = null;
-       
-       
+
+
        public HeadersDialog () : base(gladeFilename) {
                headers = Base.Document.Subtitles.Properties.Headers;
                LoadHeaders();
        }
-       
-       
+
+
        /* Private members */
-       
+
        private void LoadHeaders () {
                LoadKaraokeLRCHeaders();
                LoadKaraokeVKTHeaders();
@@ -111,7 +111,7 @@ public class HeadersDialog : GladeDialog {
                LoadSubViewer1Headers();
                LoadSubViewer2Headers();
        }
-       
+
        private void LoadKaraokeLRCHeaders() {
                entryKaraokeLRCTitle.Text = headers.Title;
                entryKaraokeLRCAuthor.Text = headers.MovieAuthor;
@@ -135,52 +135,52 @@ public class HeadersDialog : GladeDialog {
                entryMPSubAuthor.Text = headers.Author;
                entryMPSubNote.Text = headers.Comment;
 
-               comboBoxMPSubType.Active = (headers.MediaType == mpSubAudioTag ? 0 : 1); 
+               comboBoxMPSubType.Active = (headers.MediaType == mpSubAudioTag ? 0 : 1);
        }
-       
+
        private void LoadSSAASSHeaders () {
-               entrySSAASSTitle.Text = headers.Title;  
-               entrySSAASSOriginalScript.Text = headers.OriginalScript;        
+               entrySSAASSTitle.Text = headers.Title;
+               entrySSAASSOriginalScript.Text = headers.OriginalScript;
                entrySSAASSOriginalTranslation.Text = headers.OriginalTranslation;
-               entrySSAASSOriginalEditing.Text = headers.OriginalEditing;      
+               entrySSAASSOriginalEditing.Text = headers.OriginalEditing;
                entrySSAASSOriginalTiming.Text = headers.OriginalTiming;
-               entrySSAASSOriginalScriptChecking.Text = headers.OriginalScriptChecking;        
-               entrySSAASSScriptUpdatedBy.Text = headers.ScriptUpdatedBy;      
-               entrySSAASSCollisions.Text = headers.Collisions;        
+               entrySSAASSOriginalScriptChecking.Text = headers.OriginalScriptChecking;
+               entrySSAASSScriptUpdatedBy.Text = headers.ScriptUpdatedBy;
+               entrySSAASSCollisions.Text = headers.Collisions;
                entrySSAASSTimer.Text = headers.Timer;
 
                spinButtonSSAASSPlayResX.Value = headers.PlayResX;
                spinButtonSSAASSPlayResY.Value = headers.PlayResY;
-               spinButtonSSAASSPlayDepth.Value = headers.PlayDepth;    
+               spinButtonSSAASSPlayDepth.Value = headers.PlayDepth;
        }
-       
+
        private void LoadSubViewer1Headers () {
-               entrySubViewer1Title.Text = headers.Title;      
+               entrySubViewer1Title.Text = headers.Title;
                entrySubViewer1Author.Text = headers.Author;
                entrySubViewer1Source.Text = headers.VideoSource;
                entrySubViewer1Program.Text = headers.Program;
                entrySubViewer1FilePath.Text = headers.SubtitlesSource;
-               
+
                spinButtonSubViewer1Delay.Value = headers.Delay;
                spinButtonSubViewer1CDTrack.Value = headers.CDTrack;
        }
-       
+
        private void LoadSubViewer2Headers () {
-               entrySubViewer2Title.Text = headers.Title;      
+               entrySubViewer2Title.Text = headers.Title;
                entrySubViewer2Author.Text = headers.Author;
                entrySubViewer2Source.Text = headers.VideoSource;
                entrySubViewer2Program.Text = headers.Program;
                entrySubViewer2FilePath.Text = headers.SubtitlesSource;
-               entrySubViewer2Comment.Text = headers.Comment;  
-               entrySubViewer2FontName.Text = headers.FontName;        
-               entrySubViewer2FontColor.Text = headers.FontColor;      
+               entrySubViewer2Comment.Text = headers.Comment;
+               entrySubViewer2FontName.Text = headers.FontName;
+               entrySubViewer2FontColor.Text = headers.FontColor;
                entrySubViewer2FontStyle.Text = headers.FontStyle;
-               
+
                spinButtonSubViewer2Delay.Value = headers.Delay;
                spinButtonSubViewer2CDTrack.Value = headers.CDTrack;
                spinButtonSubViewer2FontSize.Value = headers.FontSize;
        }
-       
+
        private void StoreHeaders () {
                StoreKaraokeLRCHeaders();
                StoreKaraokeVKTHeaders();
@@ -189,7 +189,7 @@ public class HeadersDialog : GladeDialog {
                StoreSubViewer1Headers();
                StoreSubViewer2Headers();
        }
-       
+
        private void StoreKaraokeLRCHeaders() {
                headers.Title = entryKaraokeLRCTitle.Text;
                headers.MovieAuthor = entryKaraokeLRCAuthor.Text;
@@ -215,14 +215,14 @@ public class HeadersDialog : GladeDialog {
 
                headers.MediaType = (comboBoxMPSubType.Active == 0 ? mpSubAudioTag : mpSubVideoTag);
        }
-       
+
        private void StoreSSAASSHeaders () {
-               headers.Title = entrySSAASSTitle.Text;  
-               headers.OriginalScript = entrySSAASSOriginalScript.Text;        
+               headers.Title = entrySSAASSTitle.Text;
+               headers.OriginalScript = entrySSAASSOriginalScript.Text;
                headers.OriginalTranslation = entrySSAASSOriginalTranslation.Text;
-               headers.OriginalEditing = entrySSAASSOriginalEditing.Text;      
+               headers.OriginalEditing = entrySSAASSOriginalEditing.Text;
                headers.OriginalTiming = entrySSAASSOriginalTiming.Text;
-               headers.OriginalScriptChecking = entrySSAASSOriginalScriptChecking.Text;        
+               headers.OriginalScriptChecking = entrySSAASSOriginalScriptChecking.Text;
                headers.ScriptUpdatedBy = entrySSAASSScriptUpdatedBy.Text;
                headers.Collisions = entrySSAASSCollisions.Text;
                headers.Timer = entrySSAASSTimer.Text;
@@ -231,34 +231,34 @@ public class HeadersDialog : GladeDialog {
                headers.PlayResY = spinButtonSSAASSPlayResY.ValueAsInt;
                headers.PlayDepth = spinButtonSSAASSPlayDepth.ValueAsInt;
        }
-       
+
        private void StoreSubViewer1Headers () {
-               headers.Title = entrySubViewer1Title.Text;      
+               headers.Title = entrySubViewer1Title.Text;
                headers.Author = entrySubViewer1Author.Text;
                headers.VideoSource = entrySubViewer1Source.Text;
                headers.Program = entrySubViewer1Program.Text;
                headers.SubtitlesSource = entrySubViewer1FilePath.Text;
-               
+
                headers.Delay = spinButtonSubViewer1Delay.ValueAsInt;
                headers.CDTrack = spinButtonSubViewer1CDTrack.ValueAsInt;
        }
-       
+
        private void StoreSubViewer2Headers () {
-               headers.Title = entrySubViewer2Title.Text;      
+               headers.Title = entrySubViewer2Title.Text;
                headers.Author = entrySubViewer2Author.Text;
                headers.VideoSource = entrySubViewer2Source.Text;
                headers.Program = entrySubViewer2Program.Text;
                headers.SubtitlesSource = entrySubViewer2FilePath.Text;
                headers.Comment = entrySubViewer2Comment.Text;
-               headers.FontName = entrySubViewer2FontName.Text;        
+               headers.FontName = entrySubViewer2FontName.Text;
                headers.FontColor = entrySubViewer2FontColor.Text;
                headers.FontStyle = entrySubViewer2FontStyle.Text;
-               
+
                headers.Delay = spinButtonSubViewer2Delay.ValueAsInt;
                headers.CDTrack = spinButtonSubViewer2CDTrack.ValueAsInt;
                headers.FontSize = spinButtonSubViewer2FontSize.ValueAsInt;
        }
-       
+
        /* Event members */
 
        protected override bool ProcessResponse (ResponseType response) {
diff --git a/src/GnomeSubtitles/Dialog/MessageDialog.cs b/src/GnomeSubtitles/Dialog/MessageDialog.cs
index cddc776..2f73ee6 100644
--- a/src/GnomeSubtitles/Dialog/MessageDialog.cs
+++ b/src/GnomeSubtitles/Dialog/MessageDialog.cs
@@ -22,7 +22,7 @@ using Gtk;
 using System;
 
 namespace GnomeSubtitles.Dialog {
-       
+
        public abstract class MessageDialog : BaseDialog {
                protected Gtk.MessageDialog dialog = null;
 
@@ -37,47 +37,47 @@ namespace GnomeSubtitles.Dialog {
                public MessageDialog (MessageType messageType, string primaryText, string secondaryText) : 
base() {
                        Init(messageType, primaryText, secondaryText);
                }
-               
+
                public MessageDialog (MessageType messageType, string primaryText, string secondaryText, 
params object[]primaryTextArgs) : base() {
                        Init(messageType, primaryText, secondaryText, primaryTextArgs);
                }
 
-               
+
                /* Protected methods */
-       
+
                protected void SetText (string primaryText, string secondaryText, params object[] 
primaryTextArgs) {
                        SetPrimaryText(primaryText, primaryTextArgs);
                        SetSecondaryText(secondaryText);
                }
-       
+
                protected void SetText (string primaryText, string secondaryText) {
                        SetPrimaryText(primaryText);
                        SetSecondaryText(secondaryText);
                }
-       
+
                protected void SetPrimaryText (string text, params object[] textArgs) {
                        if (text != null) {
-                               string primaryText = Core.Util.GetFormattedText(text, textArgs); 
+                               string primaryText = Core.Util.GetFormattedText(text, textArgs);
                                dialog.Markup = GetMarkupPrimaryText(primaryText);
                        }
                }
-               
+
                protected void SetPrimaryText (string text) {
                        SetPrimaryText(text, null);
                }
-               
+
                protected void SetSecondaryText (string text, params object[] textArgs) {
                        if (text != null)
                                dialog.SecondaryText = Core.Util.GetFormattedText(text, textArgs);
                }
-               
+
                protected void SetSecondaryText (string text) {
                        SetSecondaryText(text, null);
                }
 
-               
+
                /* Private members */
-               
+
                private void Init (MessageType messageType, string primaryText, string secondaryText, params 
object[]primaryTextArgs) {
                        string formattedPrimaryText = GetMarkupPrimaryText(primaryText);
 
@@ -87,17 +87,17 @@ namespace GnomeSubtitles.Dialog {
                        SetSecondaryText(secondaryText);
                        AddButtons();
                }
-               
+
                private string GetMarkupPrimaryText (string primaryText) {
                        return "<span weight=\"bold\" size=\"larger\">" + primaryText + "</span>";
                }
 
 
                /* Abstract methods */
-               
+
                protected abstract void AddButtons ();
 
-               
+
                /* Event members */
 
                protected override bool ProcessResponse (ResponseType response) {
@@ -106,8 +106,8 @@ namespace GnomeSubtitles.Dialog {
                        }
                        return false;
                }
-               
+
        }
 
-       
+
 }
diff --git a/src/GnomeSubtitles/Dialog/PreferencesDialog.cs b/src/GnomeSubtitles/Dialog/PreferencesDialog.cs
index 7be8fb2..b325c1a 100644
--- a/src/GnomeSubtitles/Dialog/PreferencesDialog.cs
+++ b/src/GnomeSubtitles/Dialog/PreferencesDialog.cs
@@ -31,7 +31,7 @@ public class PreferencesDialog : GladeDialog {
 
        /* Constant strings */
        private const string gladeFilename = "PreferencesDialog.glade";
-       
+
        /* Components */
        private EncodingComboBox fileOpenEncoding = null;
        private EncodingComboBox fileOpenFallbackEncoding = null;
@@ -61,7 +61,7 @@ public class PreferencesDialog : GladeDialog {
        }
 
        /* Private members */
-       
+
        private void LoadValues () {
                LoadValuesFilesTab();
                LoadValuesEditingTab();
@@ -80,20 +80,20 @@ public class PreferencesDialog : GladeDialog {
 
                /* Video Auto choose file */
                videoAutoChooseFileCheckButton.Active = Base.Config.PrefsVideoAutoChooseFile;
-               
+
                /* Auto Backup */
                SetAutoBackup();
        }
-       
-       private void LoadValuesEditingTab () {  
+
+       private void LoadValuesEditingTab () {
                /* Video Seeking */
                videoSeekCheckButton.Active = Base.Config.PrefsVideoSeekOnChange;
                videoSeekRewindSpinButton.Value = Base.Config.PrefsVideoSeekOnChangeRewind;
                videoSeekRewindSpinButton.Sensitive = videoSeekCheckButton.Active;
-               
+
                /* Subtitle Splitting */
-               subtitleSplitSpinButton.Value = Base.Config.PrefsTimingsTimeBetweenSubtitles;           
-               
+               subtitleSplitSpinButton.Value = Base.Config.PrefsTimingsTimeBetweenSubtitles;
+
                /* Reaction Delay */
                SetReactionDelay();
        }
@@ -177,15 +177,15 @@ public class PreferencesDialog : GladeDialog {
                }
                fileSaveNewline.SelectionChanged += OnDefaultsFileSaveNewlineChanged;
        }
-       
+
        private void SetAutoBackup () {
                bool autoBackupEnabled = Base.Config.PrefsBackupAutoBackup;
                autoBackupCheckButton.Active = autoBackupEnabled;
-               
+
                autoBackupTimeSpinButton.Sensitive = autoBackupEnabled;
                autoBackupTimeSpinButton.Value = Base.Config.PrefsBackupBackupTime / 60; //Minutes
        }
-       
+
        private void SetReactionDelay () {
                bool reactionDelayEnabled = Base.Config.PrefsVideoApplyReactionDelay;
                reactionDelayCheckButton.Active = reactionDelayEnabled;
@@ -204,16 +204,16 @@ public class PreferencesDialog : GladeDialog {
                fileSaveEncoding.ActiveSelection = 0; //Keep Existing
                fileSaveFormat.ActiveSelection = 0; //Keep Existing
                fileSaveNewline.ChosenNewlineType = NewlineType.Windows;
-               
+
                autoBackupCheckButton.Active = true;
                autoBackupTimeSpinButton.Value = 2;
-               
+
                reactionDelayCheckButton.Active = true;
                reactionDelaySpinButton.Value = 200;
-               
+
                videoSeekCheckButton.Active = true;
                videoSeekRewindSpinButton.Value = 200;
-               
+
                subtitleSplitSpinButton.Value = 100;
        }
 
@@ -328,21 +328,21 @@ public class PreferencesDialog : GladeDialog {
        private void OnTranslationSaveAllToggled (object o, EventArgs args) {
                Base.Config.PrefsTranslationSaveAll = translationSaveAllCheckButton.Active;
        }
-       
+
        private void OnAutoBackupToggled (object o, EventArgs args) {
                bool isActive = (o as CheckButton).Active;
-               
+
                Base.Config.PrefsBackupAutoBackup = isActive;
                autoBackupTimeSpinButton.Sensitive = isActive;
-               
+
                Base.Backup.ReCheck();
        }
-       
+
        private void OnAutoBackupTimeSpinButtonValueChanged (object o, EventArgs args) {
                Base.Config.PrefsBackupBackupTime = (o as SpinButton).ValueAsInt * 60; //seconds
                Base.Backup.ReCheck();
        }
-       
+
        private void OnReactionDelayToggled (object o, EventArgs args) {
                bool isActive = (o as CheckButton).Active;
 
@@ -353,18 +353,18 @@ public class PreferencesDialog : GladeDialog {
        private void OnReactionDelaySpinButtonValueChanged (object o, EventArgs args) {
                Base.Config.PrefsVideoReactionDelay = (o as SpinButton).ValueAsInt;
        }
-       
+
        private void OnVideoSeekToggled (object o, EventArgs args) {
                bool isActive = (o as CheckButton).Active;
 
                Base.Config.PrefsVideoSeekOnChange = isActive;
                videoSeekRewindSpinButton.Sensitive = isActive;
        }
-       
+
        private void OnVideoSeekRewindSpinButtonValueChanged (object o, EventArgs args) {
                Base.Config.PrefsVideoSeekOnChangeRewind = (o as SpinButton).ValueAsInt;
        }
-       
+
        private void OnSubtitleSplitSpinButtonValueChanged (object o, EventArgs args) {
                Base.Config.PrefsTimingsTimeBetweenSubtitles = (o as SpinButton).ValueAsInt;
        }
diff --git a/src/GnomeSubtitles/Dialog/SearchDialog.cs b/src/GnomeSubtitles/Dialog/SearchDialog.cs
index a8ac7da..5d25a22 100644
--- a/src/GnomeSubtitles/Dialog/SearchDialog.cs
+++ b/src/GnomeSubtitles/Dialog/SearchDialog.cs
@@ -42,17 +42,17 @@ public class SearchDialog : GladeDialog {
        private const string gladeFilename = "SearchDialog.glade";
 
        /* Widgets */
-       
+
        [WidgetAttribute] private Entry findEntry = null;
        [WidgetAttribute] private Entry replaceEntry = null;
        [WidgetAttribute] private Label replaceLabel = null;
        [WidgetAttribute] private Table table = null;
-       
-       [WidgetAttribute] private CheckButton matchCaseCheckButton = null;      
+
+       [WidgetAttribute] private CheckButton matchCaseCheckButton = null;
        [WidgetAttribute] private CheckButton backwardsCheckButton = null;
        [WidgetAttribute] private CheckButton regexCheckButton = null;
        [WidgetAttribute] private CheckButton wrapCheckButton = null;
-       
+
        [WidgetAttribute] private Button buttonReplaceAll = null;
        [WidgetAttribute] private Button buttonReplace = null;
        [WidgetAttribute] private Button buttonFind = null;
@@ -71,15 +71,15 @@ public class SearchDialog : GladeDialog {
        public Regex ForwardRegex {
                get { return forwardRegex; }
        }
-       
+
        public Regex BackwardRegex {
                get { return backwardRegex; }
        }
-       
+
        public string Replacement {
                get { return replaceEntry.Text; }
        }
-       
+
        public bool MatchCase {
                get { return matchCaseCheckButton.Active; }
        }
@@ -87,11 +87,11 @@ public class SearchDialog : GladeDialog {
        public bool Backwards {
                get { return backwardsCheckButton.Active; }
        }
-       
+
        public bool UseRegex {
                get { return regexCheckButton.Active; }
        }
-       
+
        public bool Wrap {
                get { return wrapCheckButton.Active; }
        }
@@ -101,7 +101,7 @@ public class SearchDialog : GladeDialog {
        public override void Show () {
                Show(false);
        }
-       
+
        public void Show (bool useReplace) {
                if (useReplace) {
                        GetDialog().Title = Catalog.GetString("Replace");
@@ -111,19 +111,19 @@ public class SearchDialog : GladeDialog {
                        GetDialog().Title = Catalog.GetString("Find");
                        table.RowSpacing = 0;
                }
-               
+
                replaceEntry.Visible = useReplace;
                replaceLabel.Visible = useReplace;
-               
+
                buttonReplaceAll.Visible = useReplace;
                buttonReplace.Visible = useReplace;
-               
+
                LoadDialogValues();
                base.Show();
        }
-       
+
        /* Private methods */
-       
+
        private bool ValuesHaveChanged () {
                if (!valuesMayHaveChanged)
                        return false;
@@ -137,7 +137,7 @@ public class SearchDialog : GladeDialog {
                        return true;
                if (wrap != wrapCheckButton.Active)
                        return true;
-               
+
                return false;
        }
 
@@ -164,51 +164,51 @@ public class SearchDialog : GladeDialog {
                matchCase = matchCaseCheckButton.Active;
                backwards = backwardsCheckButton.Active;
                useRegex = regexCheckButton.Active;
-               wrap = wrapCheckButton.Active;  
+               wrap = wrapCheckButton.Active;
        }
-       
+
        private void HandleValuesChange () {
                bool updateRegex = ValuesHaveChanged(); //Need to be before SaveDialogValues, as the values 
will be changed
                SaveDialogValues();
                if (updateRegex)
                        UpdateRegex();
-       
+
        }
-       
+
        private void Find () {
                HandleValuesChange();
-               
+
                bool found = Core.Base.Ui.View.Search.Find();
                if (found)
                        buttonReplace.Sensitive = true;
        }
-       
+
        private void Replace () {
                HandleValuesChange();
-               
+
                bool foundNext = Core.Base.Ui.View.Search.Replace();
                if (!foundNext) //No other text was found to replace, after replacing this one
                        buttonReplace.Sensitive = false;
        }
-       
+
        private void ReplaceAll () {
                HandleValuesChange();
-               
+
                Core.Base.Ui.View.Search.ReplaceAll();
        }
-       
+
        private void UpdateRegex() {
                RegexOptions options = RegexOptions.Singleline;
                if (!matchCase)
                        options |= RegexOptions.IgnoreCase;
-                               
+
                string regexText = (useRegex ? text : Regex.Escape(text));
                forwardRegex = new Regex(regexText, options);
                backwardRegex = new Regex(regexText, options | RegexOptions.RightToLeft);
        }
 
        /* Event members */
-       
+
        #pragma warning disable 169             //Disables warning about handlers not being used
 
        protected override bool ProcessResponse (ResponseType response) {
@@ -244,15 +244,15 @@ public class SearchDialog : GladeDialog {
                        buttonReplaceAll.Sensitive = true;
                }
        }
-       
+
        private void OnReplaceTextChanged (object o, EventArgs args) {
                valuesMayHaveChanged = true;
        }
-       
+
        private void OnMatchCaseToggled (object o, EventArgs args) {
                valuesMayHaveChanged = true;
        }
-       
+
        private void OnBackwardsToggled (object o, EventArgs args) {
                valuesMayHaveChanged = true;
        }
@@ -260,10 +260,10 @@ public class SearchDialog : GladeDialog {
        private void OnUseRegexToggled (object o, EventArgs args) {
                valuesMayHaveChanged = true;
        }
-       
+
        private void OnWrapToggled (object o, EventArgs args) {
                valuesMayHaveChanged = true;
-       }       
+       }
 
 }
 
diff --git a/src/GnomeSubtitles/Dialog/SetLanguageDialog.cs b/src/GnomeSubtitles/Dialog/SetLanguageDialog.cs
index 0aec79a..ff6d8cc 100644
--- a/src/GnomeSubtitles/Dialog/SetLanguageDialog.cs
+++ b/src/GnomeSubtitles/Dialog/SetLanguageDialog.cs
@@ -33,7 +33,7 @@ public abstract class SetLanguageDialog : GladeDialog {
 
        /* Constant strings */
        private const string gladeFilename = "SetLanguageDialog.glade";
-       
+
        /* Strings */
        private string dialogTitleText = Catalog.GetString("Set Text Language");
        private string dialogTitleTranslation = Catalog.GetString("Set Translation Language");
@@ -41,14 +41,14 @@ public abstract class SetLanguageDialog : GladeDialog {
        private string introLabelTranslation = Catalog.GetString("Select the translation _language of the 
current subtitles.");
 
        /* Widgets */
-       
+
        [WidgetAttribute] private TreeView languagesTreeView = null;
        [WidgetAttribute] private Label introLabel = null;
 
 
        protected SetLanguageDialog (SubtitleTextType textType) : base(gladeFilename) {
                this.textType = textType;
-       
+
                SetDialogTitle(textType);
                SetIntroLabel(textType);
                FillAvailableLanguages();
@@ -56,37 +56,37 @@ public abstract class SetLanguageDialog : GladeDialog {
        }
 
        /* Private members */
-       
+
        private void FillAvailableLanguages () {
                TreeViewColumn col = new TreeViewColumn("col", new CellRendererText(), "text", colNum);
                languagesTreeView.AppendColumn(col);
-       
+
                store = new ListStore(typeof(string));
                foreach (SpellLanguage language in Base.SpellLanguages.Languages) {
                        store.AppendValues(language.Name);
                }
-               
+
                languagesTreeView.Model = store;
        }
-       
+
        private void SelectActiveLanguage (SubtitleTextType textType) {
                int count = store.IterNChildren();
                if (count == 0)
                        return;
-               
+
                int activeLanguageIndex = GetActiveLanguageIndex(textType, count);
-               
+
                TreePath path = Core.Util.IntToPath(activeLanguageIndex);
                languagesTreeView.ScrollToCell(path, null, true, 0.5f, 0.5f);
                languagesTreeView.SetCursor(path, null, false);
        }
-       
+
        private int GetActiveLanguageIndex (SubtitleTextType textType, int count) {
                int activeLanguageIndex = Base.SpellLanguages.GetActiveLanguageIndex(textType);
                /* Set active language to the first if invalid */
                if ((activeLanguageIndex == -1) || (activeLanguageIndex >= count))
                        activeLanguageIndex = 0;
-                       
+
                return activeLanguageIndex;
        }
 
@@ -94,19 +94,19 @@ public abstract class SetLanguageDialog : GladeDialog {
                int selectedLanguageIndex = GetSelectedLanguageIndex();
                Base.SpellLanguages.SetActiveLanguageIndex(textType, selectedLanguageIndex);
        }
-       
+
        private int GetSelectedLanguageIndex () {
                int count = languagesTreeView.Selection.CountSelectedRows();
                if (count != 1)
                        return -1;
-                       
+
                TreePath path = GetSelectedPath(languagesTreeView);
                if (path == null)
                        return -1;
-                       
+
                return Core.Util.PathToInt(path);
        }
-       
+
        private TreePath GetSelectedPath (TreeView tree) {
                TreePath[] paths = tree.Selection.GetSelectedRows();
                if ((paths == null) || (paths.Length != 1))
@@ -115,15 +115,15 @@ public abstract class SetLanguageDialog : GladeDialog {
                TreePath selected = paths[0];
                return selected;
        }
-       
+
        private void SetDialogTitle (SubtitleTextType textType) {
                GetDialog().Title = (textType == SubtitleTextType.Text ? dialogTitleText : 
dialogTitleTranslation);
        }
-       
+
        private void SetIntroLabel (SubtitleTextType textType) {
                introLabel.TextWithMnemonic = (textType == SubtitleTextType.Text ? introLabelText : 
introLabelTranslation);
        }
-       
+
        /* Event members */
 
        #pragma warning disable 169             //Disables warning about handlers not being used
@@ -135,7 +135,7 @@ public abstract class SetLanguageDialog : GladeDialog {
                }
                return false;
        }
-       
+
        private void OnLanguageRowActivated (object o, RowActivatedArgs args) {
                SetSpellLanguage();
                SetReturnValue(true);
diff --git a/src/GnomeSubtitles/Dialog/SetTextLanguageDialog.cs 
b/src/GnomeSubtitles/Dialog/SetTextLanguageDialog.cs
index 754c901..0b8723d 100644
--- a/src/GnomeSubtitles/Dialog/SetTextLanguageDialog.cs
+++ b/src/GnomeSubtitles/Dialog/SetTextLanguageDialog.cs
@@ -22,7 +22,7 @@ using SubLib.Core.Domain;
 namespace GnomeSubtitles.Dialog {
 
 public class SetTextLanguageDialog : SetLanguageDialog {
-       
+
        public SetTextLanguageDialog () : base(SubtitleTextType.Text) {
        }
 
diff --git a/src/GnomeSubtitles/Dialog/SetTranslationLanguageDialog.cs 
b/src/GnomeSubtitles/Dialog/SetTranslationLanguageDialog.cs
index 09d8c37..ee74418 100644
--- a/src/GnomeSubtitles/Dialog/SetTranslationLanguageDialog.cs
+++ b/src/GnomeSubtitles/Dialog/SetTranslationLanguageDialog.cs
@@ -22,7 +22,7 @@ using SubLib.Core.Domain;
 namespace GnomeSubtitles.Dialog {
 
 public class SetTranslationLanguageDialog : SetLanguageDialog {
-       
+
        public SetTranslationLanguageDialog () : base(SubtitleTextType.Translation) {
        }
 
diff --git a/src/GnomeSubtitles/Dialog/SubtitleFileSaveAsDialog.cs 
b/src/GnomeSubtitles/Dialog/SubtitleFileSaveAsDialog.cs
index 34dc097..cd8cf4f 100644
--- a/src/GnomeSubtitles/Dialog/SubtitleFileSaveAsDialog.cs
+++ b/src/GnomeSubtitles/Dialog/SubtitleFileSaveAsDialog.cs
@@ -80,14 +80,14 @@ public abstract class SubtitleFileSaveAsDialog : GladeDialog {
        public SubtitleType SubtitleType {
                get { return chosenSubtitleType; }
        }
-       
+
        public NewlineType NewlineType {
                get { return chosenNewlineType; }
        }
 
-       
+
        /* Private members */
-       
+
        private void InitEncodingComboBox () {
                int fixedEncoding = GetFixedEncoding();
                ConfigFileSaveEncoding encodingConfig = Base.Config.PrefsDefaultsFileSaveEncoding;
@@ -127,7 +127,7 @@ public abstract class SubtitleFileSaveAsDialog : GladeDialog {
 
                this.newlineComboBoxComponent = new NewlineTypeComboBox(newlineTypeComboBox, 
newlineTypeToSelect, null);
        }
-       
+
        private void SetTitle () {
                if (textType == SubtitleTextType.Text)
                        dialog.Title = Catalog.GetString("Save As");
@@ -152,7 +152,7 @@ public abstract class SubtitleFileSaveAsDialog : GladeDialog {
                        return SubtitleType.Unknown;
                }
        }
-       
+
        private void SetDialogFromFileProperties () {
                /* Set folder */
                if ((textType == SubtitleTextType.Translation) && Base.Document.HasTranslationFileProperties 
&& Base.Document.TranslationFile.IsPathRooted)
@@ -161,7 +161,7 @@ public abstract class SubtitleFileSaveAsDialog : GladeDialog {
                        dialog.SetCurrentFolder(Base.Document.TextFile.Directory);
                else
                        
dialog.SetCurrentFolder(Environment.GetFolderPath(Environment.SpecialFolder.Personal));
-               
+
                /* Set filename */
                FileProperties fileProperties = (textType == SubtitleTextType.Text ? Base.Document.TextFile : 
Base.Document.TranslationFile);
                if ((fileProperties != null) && (fileProperties.Filename != String.Empty))
@@ -169,15 +169,15 @@ public abstract class SubtitleFileSaveAsDialog : GladeDialog {
                else
                        dialog.CurrentName = (textType == SubtitleTextType.Text ? 
Base.Document.UnsavedTextFilename : Base.Document.UnsavedTranslationFilename);
        }
-       
-       
+
+
        private string UpdateFilenameExtension (string filename, SubtitleType type) {
                SubtitleTypeInfo typeInfo = Subtitles.GetAvailableType(type);
                string newExtensionDotted = "." + typeInfo.PreferredExtension;
 
                int index = -1;
                string extensionDotted = "." + GetFilenameExtension(filename, out index);
-               
+
                if (extensionDotted == newExtensionDotted) //filename already has the correct extension
                        return filename;
                else if (index == -1) //filename doesn't have an extension, appending
@@ -201,7 +201,7 @@ public abstract class SubtitleFileSaveAsDialog : GladeDialog {
                else
                        return filename + "." + typeInfo.PreferredExtension;
        }
-       
+
        /// <summary>Returns the extension for the specified filename.</summary>
        private string GetFilenameExtension (string filename, out int index) {
                int dotIndex = filename.LastIndexOf('.');
diff --git a/src/GnomeSubtitles/Dialog/TimingsAdjustDialog.cs 
b/src/GnomeSubtitles/Dialog/TimingsAdjustDialog.cs
index 144b5a7..d2a3f8a 100644
--- a/src/GnomeSubtitles/Dialog/TimingsAdjustDialog.cs
+++ b/src/GnomeSubtitles/Dialog/TimingsAdjustDialog.cs
@@ -31,12 +31,12 @@ namespace GnomeSubtitles.Dialog {
 
 public class TimingsAdjustDialog : GladeDialog {
        private TimingMode timingMode;
-       
+
        /* Constant strings */
        private const string gladeFilename = "TimingsAdjustDialog.glade";
-       
+
        /* Widgets */
-       
+
        [WidgetAttribute] private Label firstSubtitleStartLabel = null;
        [WidgetAttribute] private Label firstSubtitleNoInputLabel = null;
        [WidgetAttribute] private Label firstSubtitleStartInputLabel = null;
@@ -45,18 +45,18 @@ public class TimingsAdjustDialog : GladeDialog {
        [WidgetAttribute] private Label lastSubtitleNoInputLabel = null;
        [WidgetAttribute] private Label lastSubtitleStartInputLabel = null;
        [WidgetAttribute] private SpinButton lastSubtitleNewStartSpinButton = null;
-       [WidgetAttribute] private RadioButton allSubtitlesRadioButton = null;   
+       [WidgetAttribute] private RadioButton allSubtitlesRadioButton = null;
        [WidgetAttribute] private RadioButton selectedRangeRadioButton = null;
-       
+
 
        public TimingsAdjustDialog () : base(gladeFilename){
-               timingMode = Base.TimingMode; 
+               timingMode = Base.TimingMode;
                SetSpinButtons();
                UpdateForTimingMode();
                SetApplyToSelectionSensitivity();
                SetSelectionType();
        }
-       
+
        private void SetSpinButtons () {
                firstSubtitleNewStartSpinButton.WidthChars = Core.Util.SpinButtonTimeWidthChars;
                lastSubtitleNewStartSpinButton.WidthChars = Core.Util.SpinButtonTimeWidthChars;
@@ -83,22 +83,22 @@ public class TimingsAdjustDialog : GladeDialog {
 
        private void SetApplyToAll () {
                SubtitleCollection collection = Base.Document.Subtitles.Collection;
-               
+
                int firstNo = 1;
-               int lastNo = collection.Count;          
+               int lastNo = collection.Count;
                UpdateInputValues(firstNo, lastNo);
        }
-       
+
        private void SetApplyToSelection () {
                TreePath firstPath = Core.Base.Ui.View.Selection.FirstPath;
                TreePath lastPath = Core.Base.Ui.View.Selection.LastPath;
-               
+
                int firstNo = firstPath.Indices[0] + 1;
                int lastNo = lastPath.Indices[0] + 1;
-               
+
                UpdateInputValues (firstNo, lastNo);
        }
-       
+
        private void SetApplyToSelectionSensitivity () {
                int selectionCount = Core.Base.Ui.View.Selection.Count;
                if (selectionCount < 2)
@@ -109,10 +109,10 @@ public class TimingsAdjustDialog : GladeDialog {
                SubtitleCollection collection = Base.Document.Subtitles.Collection;
                Subtitle firstSubtitle = collection.Get(firstNo - 1);
                Subtitle lastSubtitle = collection.Get(lastNo - 1);
-       
+
                firstSubtitleNoInputLabel.Text = firstNo.ToString();
                lastSubtitleNoInputLabel.Text = lastNo.ToString();
-               
+
                if (timingMode == TimingMode.Frames) {
                        firstSubtitleStartInputLabel.Text = firstSubtitle.Frames.Start.ToString();
                        firstSubtitleNewStartSpinButton.Value = firstSubtitle.Frames.Start;
@@ -134,7 +134,7 @@ public class TimingsAdjustDialog : GladeDialog {
        protected override bool ProcessResponse (ResponseType response) {
                if (response == ResponseType.Ok) {
                        SelectionIntended selectionIntended = (allSubtitlesRadioButton.Active ? 
SelectionIntended.All : SelectionIntended.Range);
-                       
+
                        if (timingMode == TimingMode.Times) {
                                TimeSpan firstTime = TimeSpan.Parse(firstSubtitleNewStartSpinButton.Text);
                                TimeSpan lastTime = TimeSpan.Parse(lastSubtitleNewStartSpinButton.Text);
@@ -148,12 +148,12 @@ public class TimingsAdjustDialog : GladeDialog {
                }
                return false;
        }
-       
+
        private void OnToggleAllSubtitles (object o, EventArgs args) {
                if ((o as RadioButton).Active)
                        SetApplyToAll();
        }
-       
+
        private void OnToggleSelectedSubtitles (object o, EventArgs args) {
                if ((o as RadioButton).Active)
                        SetApplyToSelection();
diff --git a/src/GnomeSubtitles/Dialog/TimingsShiftDialog.cs b/src/GnomeSubtitles/Dialog/TimingsShiftDialog.cs
index 3c0993f..4e9bad8 100644
--- a/src/GnomeSubtitles/Dialog/TimingsShiftDialog.cs
+++ b/src/GnomeSubtitles/Dialog/TimingsShiftDialog.cs
@@ -54,17 +54,17 @@ public class TimingsShiftDialog : GladeDialog {
 
        public override void Show () {
                UpdateContents(false);
-               base.Show();            
+               base.Show();
        }
-       
+
        /* Private methods */
-       
+
        private void UpdateContents (bool initializing) {
                UpdateFromTimingMode(Base.TimingMode, initializing);
                UpdateFromSelection();
                UpdateSpinButtonValue(initializing);
        }
-       
+
        private void InitSpinButton () {
                spinButton.WidthChars = Core.Util.SpinButtonTimeWidthChars;
                spinButton.Alignment = 0.5f;
@@ -73,16 +73,16 @@ public class TimingsShiftDialog : GladeDialog {
        private void UpdateFromTimingMode (TimingMode newTimingMode, bool initializing) {
                if ((!initializing) && (newTimingMode == timingMode))
                        return;
-                       
-               timingMode = newTimingMode;     
+
+               timingMode = newTimingMode;
                Core.Util.SetSpinButtonTimingMode(spinButton, timingMode);
                Core.Util.SetSpinButtonMaxAdjustment(spinButton, timingMode, true);
-               
+
                string label = (timingMode == TimingMode.Times ? Catalog.GetString("Time") : 
Catalog.GetString("Frames"));
                string markup = "<b>" + label + "</b>";
                timingModeLabel.Markup = markup;
        }
-       
+
        private void UpdateFromSelection () {
                int selectionCount = Core.Base.Ui.View.Selection.Count;
                fromFirstSubtitleToSelectionRadioButton.Sensitive = (selectionCount == 1);
@@ -93,13 +93,13 @@ public class TimingsShiftDialog : GladeDialog {
                else
                        selectedSubtitlesRadioButton.Sensitive = false;
        }
-       
+
        private void UpdateSpinButtonValue (bool initializing) {
                if (!Core.Base.Ui.Video.IsLoaded) {
                        SetSpinButtonValue(0);
                        return;
                }
-               
+
                TreePath path = Core.Base.Ui.View.Selection.FirstPath;
                Subtitle subtitle = Base.Document.Subtitles[path];
 
@@ -117,11 +117,11 @@ public class TimingsShiftDialog : GladeDialog {
                double difference = videoPosition - subtitlePosition;
                SetSpinButtonValue(difference);
        }
-       
+
        private void SetSpinButtonValue (double newValue) {
                spinButton.Value = newValue;
        }
-       
+
        private SelectionIntended GetSelectionIntended () {
                if (allSubtitlesRadioButton.Active)
                        return SelectionIntended.All;
@@ -134,7 +134,7 @@ public class TimingsShiftDialog : GladeDialog {
        }
 
        #pragma warning disable 169             //Disables warning about handlers not being used
-       
+
        private void OnClear (object o, EventArgs args) {
                SetSpinButtonValue(0);
        }
@@ -142,7 +142,7 @@ public class TimingsShiftDialog : GladeDialog {
        protected override bool ProcessResponse (ResponseType response) {
                if ((response == ResponseType.Ok) && (spinButton.Value != 0)) {
                        SelectionIntended selectionIntended = GetSelectionIntended();
-                       
+
                        if (timingMode == TimingMode.Times) {
                                TimeSpan time = TimeSpan.FromMilliseconds(spinButton.Value);
                                Base.CommandManager.Execute(new ShiftTimingsCommand(time, selectionIntended));
diff --git a/src/GnomeSubtitles/Dialog/TimingsSynchronizeDialog.cs 
b/src/GnomeSubtitles/Dialog/TimingsSynchronizeDialog.cs
index 0d95a7e..dc64fac 100644
--- a/src/GnomeSubtitles/Dialog/TimingsSynchronizeDialog.cs
+++ b/src/GnomeSubtitles/Dialog/TimingsSynchronizeDialog.cs
@@ -30,15 +30,15 @@ using System.Collections;
 namespace GnomeSubtitles.Dialog {
 
 public class TimingsSynchronizeDialog : GladeDialog {
-       private TimingMode timingMode = TimingMode.Times; 
+       private TimingMode timingMode = TimingMode.Times;
        private GnomeSubtitles.Core.SyncPoints syncPoints = new GnomeSubtitles.Core.SyncPoints();
        private TreeViewColumn numberCol = null;
        private TreeViewColumn currentStartCol = null;
        private TreeViewColumn correctStartCol = null;
-               
+
        /* Constant strings */
        private const string gladeFilename = "TimingsSynchronizeDialog.glade";
-       
+
        /* Widgets */
        [WidgetAttribute] private TreeView syncPointsTree = null;
        [WidgetAttribute] private Button buttonAdd = null;
@@ -49,13 +49,13 @@ public class TimingsSynchronizeDialog : GladeDialog {
 
        public TimingsSynchronizeDialog () : base(gladeFilename, true){
                this.timingMode = Base.TimingMode;
-       
+
                CreateColumns();
                SetModel();
                InitWidgetSensitivity();
-               
+
                ConnectHandlers();
-               
+
                UpdateStatusMessage();
        }
 
@@ -70,14 +70,14 @@ public class TimingsSynchronizeDialog : GladeDialog {
                base.Destroy();
        }
 
-       
-       
+
+
        /* Private methods */
-       
+
        private void CreateColumns() {
        /* Number column */
        numberCol = Core.Util.CreateTreeViewColumn(Catalog.GetString("Subtitle No."), -1, new 
CellRendererText(), RenderSubtitleNumberCell);
-       
+
        /* Start (current and correct) columns */
        currentStartCol = Core.Util.CreateTreeViewColumn(Catalog.GetString("Current Start"), -1, new 
CellRendererText(), RenderCurrentStartCell);
        correctStartCol = Core.Util.CreateTreeViewColumn(Catalog.GetString("Correct Start"), -1, new 
CellRendererText(), RenderCorrectStartCell);
@@ -88,16 +88,16 @@ public class TimingsSynchronizeDialog : GladeDialog {
 
        syncPointsTree.AppendColumn(new TreeViewColumn()); //Appending to leave empty space to the right
     }
-    
+
     private void SetModel () {
                syncPointsTree.Model = syncPoints.Model;
        }
-       
+
        private void UpdateFromSyncPointCountChanged () {
                UpdateStatusMessage();
                UpdateSynchronizeButtonSensitivity();
        }
-       
+
        private void UpdateStatusMessage () {
                string message = String.Empty;
                switch (syncPoints.Collection.Count) {
@@ -131,38 +131,38 @@ public class TimingsSynchronizeDialog : GladeDialog {
                }
                statusMessageLabel.Text = message;
        }
-       
+
        private void UpdateSynchronizeButtonSensitivity () {
                buttonSynchronize.Sensitive = (syncPoints.Collection.Count >= 2);
        }
-       
+
        private void SelectPath (TreePath path) {
                syncPointsTree.SetCursor(path, null, false);
        }
-       
+
        private void InitWidgetSensitivity () {
                buttonAdd.Sensitive = (Base.Ui.View.Selection.Count == 1);
        }
-       
+
        private ArrayList GetOutOfRangeIntervals () {
                Ui.View.Subtitles subtitles = Base.Document.Subtitles;
                ArrayList intervals = new ArrayList();
                if (syncPoints.Collection.Count == 0)
                        return intervals;
-               
+
                SyncPoint first = syncPoints.Collection.Get(0);
                if (first.SubtitleNumber > 0) {
                        string firstInterval = "1" + (first.SubtitleNumber > 1 ? "-" + first.SubtitleNumber : 
String.Empty);
                        intervals.Add(firstInterval);
                }
-               
+
                SyncPoint last = syncPoints.Collection.Get(syncPoints.Collection.Count - 1);
                int lastSubtitleNumber = subtitles.Count - 1;
                if (last.SubtitleNumber < lastSubtitleNumber) {
                        string lastInterval = (last.SubtitleNumber < lastSubtitleNumber - 1 ? 
(last.SubtitleNumber + 2) + "-" : String.Empty) + (lastSubtitleNumber + 1);
                        intervals.Add(lastInterval);
                }
-               
+
                return intervals;
        }
 
@@ -170,7 +170,7 @@ public class TimingsSynchronizeDialog : GladeDialog {
                return (syncPoints.Collection.Count > 0)
                        && (syncPoints.Collection.Get(syncPoints.Collection.Count - 1).SubtitleNumber < 
Base.Document.Subtitles.Count);
        }
-    
+
     /* Cell Renderers */
 
        private void RenderSubtitleNumberCell (TreeViewColumn column, CellRenderer cell, TreeModel treeModel, 
TreeIter iter) {
@@ -184,7 +184,7 @@ public class TimingsSynchronizeDialog : GladeDialog {
                else
                        renderer.Text = Core.Util.TimeSpanToText(syncPoints[iter].Current.Time);
        }
-       
+
        private void RenderCorrectStartCell (TreeViewColumn column, CellRenderer cell, TreeModel model, 
TreeIter iter) {
                CellRendererText renderer = cell as CellRendererText;
                if (timingMode == TimingMode.Frames)
@@ -192,21 +192,21 @@ public class TimingsSynchronizeDialog : GladeDialog {
                else
                        renderer.Text = Core.Util.TimeSpanToText(syncPoints[iter].Correct.Time);
        }
-       
+
        /* Event members */
-       
+
        #pragma warning disable 169             //Disables warning about handlers not being used
-       
+
        private void ConnectHandlers () {
                syncPointsTree.Selection.Changed += OnSelectionChanged;
-               
+
                /* External event handlers */
                Base.Ui.View.Selection.Changed += OnUiViewSelectionChanged;
        }
-       
+
        private void OnSelectionChanged (object o, EventArgs args) {
                TreeSelection selection = (o as TreeSelection);
-               buttonRemove.Sensitive = (selection.CountSelectedRows() > 0); 
+               buttonRemove.Sensitive = (selection.CountSelectedRows() > 0);
        }
 
        private void OnRowActivated (object o, RowActivatedArgs args) {
@@ -217,23 +217,23 @@ public class TimingsSynchronizeDialog : GladeDialog {
                        Base.Ui.Video.Seek(syncPoint.Correct.Time);
                }
        }
-       
+
        private void OnAdd (object o, EventArgs args) {
                /* Check if document and video are loaded */
                if (!(Base.IsDocumentLoaded && Base.Ui.Video.IsLoaded))
                        return;
-       
+
                /* Get selected subtitle */
                TreePath path = Base.Ui.View.Selection.Path;
                if (path == null)
                        return;
-               
+
                int subtitleNumber = Core.Util.PathToInt(path);
                Subtitle subtitle = Base.Ui.View.Selection.Subtitle;
-               
+
                /* Get current start */
                Timing currentTiming = new Timing(subtitle.Frames.Start, subtitle.Times.Start);
-               
+
                /* Get correct start from video */
                Timing correctTiming = new Timing(Base.Ui.Video.Position.CurrentFrames, 
Base.Ui.Video.Position.CurrentTime);
 
@@ -241,11 +241,11 @@ public class TimingsSynchronizeDialog : GladeDialog {
                SyncPoint syncPoint = new SyncPoint(subtitleNumber, currentTiming, correctTiming);
                int syncPointIndex = syncPoints.Add(syncPoint);
                TreePath syncPointPath = Core.Util.IntToPath(syncPointIndex);
-               SelectPath(syncPointPath);              
-               
+               SelectPath(syncPointPath);
+
                UpdateFromSyncPointCountChanged();
        }
-       
+
        private void OnRemove (object o, EventArgs args) {
                TreePath[] paths = syncPointsTree.Selection.GetSelectedRows();
                if (paths.Length == 0)
@@ -258,14 +258,14 @@ public class TimingsSynchronizeDialog : GladeDialog {
                        int subtitleToDelete = (firstDeletedSubtitle < syncPointCount ? firstDeletedSubtitle 
: syncPointCount - 1);
                        syncPointsTree.SetCursor(Core.Util.IntToPath(subtitleToDelete), null, false);
                }
-               
+
                UpdateFromSyncPointCountChanged();
        }
-       
+
        private void OnSynchronizeAllSubtitlesToggled (object o, EventArgs args) {
                UpdateStatusMessage();
        }
-       
+
        private void OnUiViewSelectionChanged (TreePath[] paths, Subtitle subtitle) {
                buttonAdd.Sensitive = (subtitle != null);
        }
@@ -275,14 +275,14 @@ public class TimingsSynchronizeDialog : GladeDialog {
                        if (CanSynchronize()) {
                                bool toSyncAll = syncAllSubtitlesCheckButton.Active;
                                SelectionIntended selectionIntended = (toSyncAll ? SelectionIntended.All : 
SelectionIntended.Range);
-                               
+
                                TreePath[] pathRange = null;
                                if (selectionIntended == SelectionIntended.Range) {
                                        pathRange = new TreePath[2];
                                        pathRange[0] = 
Core.Util.IntToPath(syncPoints.Collection[0].SubtitleNumber);
                                        pathRange[1] = 
Core.Util.IntToPath(syncPoints.Collection[syncPoints.Collection.Count - 1].SubtitleNumber);
                                }
-                               
+
                                Base.CommandManager.Execute(new SynchronizeTimingsCommand(syncPoints, 
toSyncAll, selectionIntended, pathRange));
                        }
                        return true;
diff --git a/src/GnomeSubtitles/Dialog/TranslationSaveAsDialog.cs 
b/src/GnomeSubtitles/Dialog/TranslationSaveAsDialog.cs
index acd603a..b1ec737 100644
--- a/src/GnomeSubtitles/Dialog/TranslationSaveAsDialog.cs
+++ b/src/GnomeSubtitles/Dialog/TranslationSaveAsDialog.cs
@@ -22,7 +22,7 @@ using SubLib.Core.Domain;
 namespace GnomeSubtitles.Dialog {
 
 public class TranslationSaveAsDialog : SubtitleFileSaveAsDialog {
-       
+
        public TranslationSaveAsDialog () : base(SubtitleTextType.Translation) {
        }
 
diff --git a/src/GnomeSubtitles/Dialog/Unmanaged/BasicErrorDialog.cs 
b/src/GnomeSubtitles/Dialog/Unmanaged/BasicErrorDialog.cs
index 4ae91be..ca92acb 100644
--- a/src/GnomeSubtitles/Dialog/Unmanaged/BasicErrorDialog.cs
+++ b/src/GnomeSubtitles/Dialog/Unmanaged/BasicErrorDialog.cs
@@ -28,13 +28,13 @@ public class BasicErrorDialog : ErrorDialog {
        public BasicErrorDialog (string primary, string secondary) : base(primary, secondary) {
        }
 
-       
+
        /* Protected methods */
-       
+
        protected override void AddButtons () {
                dialog.AddButton(Stock.Ok, ResponseType.Ok);
        }
-       
+
 
 }
 
diff --git a/src/GnomeSubtitles/Dialog/Unmanaged/ErrorDialog.cs 
b/src/GnomeSubtitles/Dialog/Unmanaged/ErrorDialog.cs
index ea3f500..272e773 100644
--- a/src/GnomeSubtitles/Dialog/Unmanaged/ErrorDialog.cs
+++ b/src/GnomeSubtitles/Dialog/Unmanaged/ErrorDialog.cs
@@ -29,17 +29,17 @@ public abstract class ErrorDialog : MessageDialog {
        /// <remarks><see cref="SetText" /> can be used to set the dialog text, and <see cref="AddButtons" /> 
overriden to add buttons.</remarks>
        public ErrorDialog () : base(MessageType.Error) {
        }
-       
+
        public ErrorDialog (string primary, string secondary) : base(MessageType.Error, primary, secondary) {
        }
-       
-       
+
+
        #region Protected methods
 
        protected string GetGeneralExceptionErrorMessage (Exception exception) {
                return Catalog.GetString("An unknown error has occured. Please report a bug and include this 
error name:") + " \"" + exception.GetType() + "\".";
        }
-       
+
        #endregion
 
 }
diff --git a/src/GnomeSubtitles/Dialog/Unmanaged/FileOpenErrorDialog.cs 
b/src/GnomeSubtitles/Dialog/Unmanaged/FileOpenErrorDialog.cs
index 77db280..ba45bdf 100644
--- a/src/GnomeSubtitles/Dialog/Unmanaged/FileOpenErrorDialog.cs
+++ b/src/GnomeSubtitles/Dialog/Unmanaged/FileOpenErrorDialog.cs
@@ -24,10 +24,10 @@ using System;
 namespace GnomeSubtitles.Dialog.Unmanaged {
 
 public abstract class FileOpenErrorDialog : ErrorDialog {
-       
+
        /* Strings */
        private string primaryTextStart = Catalog.GetString("Could not open the file");
-       private string actionLabel = Catalog.GetString("Open another file"); 
+       private string actionLabel = Catalog.GetString("Open another file");
 
        public FileOpenErrorDialog (Uri uri, Exception exception) : this(uri.LocalPath, exception) {
        }
@@ -39,19 +39,19 @@ public abstract class FileOpenErrorDialog : ErrorDialog {
                string secondaryText = GetSecondaryText(exception);
                SetText(primaryText, secondaryText);
        }
-       
+
        /* Protected methods */
-       
+
        protected override void AddButtons () {
                Button actionButton = dialog.AddButton(actionLabel, ResponseType.Accept) as Button;
                actionButton.Image = new Image(Stock.Open, IconSize.Button);
                dialog.AddButton(Stock.Ok, ResponseType.Ok);
        }
-       
+
        protected virtual string GetPrimaryText (string filename) {
                return primaryTextStart + " " + filename + ".";
        }
-       
+
        protected virtual string GetSecondaryText (Exception exception) {
                string text = SecondaryTextFromException(exception);
                if (text != String.Empty)
@@ -64,7 +64,7 @@ public abstract class FileOpenErrorDialog : ErrorDialog {
 
 
        /* Abstract methods */
-       
+
        protected abstract string SecondaryTextFromException (Exception exception);
 
 }
diff --git a/src/GnomeSubtitles/Dialog/Unmanaged/FileSaveErrorDialog.cs 
b/src/GnomeSubtitles/Dialog/Unmanaged/FileSaveErrorDialog.cs
index 4c23b89..5c11ae3 100644
--- a/src/GnomeSubtitles/Dialog/Unmanaged/FileSaveErrorDialog.cs
+++ b/src/GnomeSubtitles/Dialog/Unmanaged/FileSaveErrorDialog.cs
@@ -27,10 +27,10 @@ using System.Security;
 namespace GnomeSubtitles.Dialog.Unmanaged {
 
 public class FileSaveErrorDialog : ErrorDialog {
-       
+
        /* Strings */
        private string primaryTextStart = Catalog.GetString("Could not save the file");
-       private string actionLabel = Catalog.GetString("Save to another file"); 
+       private string actionLabel = Catalog.GetString("Save to another file");
 
        public FileSaveErrorDialog (string filename, Exception exception) {
                Console.Error.WriteLine("File save error:\n" + exception);
@@ -39,21 +39,21 @@ public class FileSaveErrorDialog : ErrorDialog {
                string secondaryText = GetSecondaryText(exception);
                SetText(primaryText, secondaryText);
        }
-       
+
        /* Protected methods */
-       
+
        protected override void AddButtons () {
                Button actionButton = dialog.AddButton(actionLabel, ResponseType.Accept) as Button;
                actionButton.Image = new Image(Stock.Save, IconSize.Button);
                dialog.AddButton(Stock.Ok, ResponseType.Ok);
        }
-       
+
        /* Private methods */
-       
+
        private string GetPrimaryText (string filename) {
                return primaryTextStart + " " + filename + ".";
        }
-       
+
        private string GetSecondaryText (Exception exception) {
                if (exception is OutOfMemoryException)
                        return Catalog.GetString("You have run out of memory. Please close some programs and 
try again.");
diff --git a/src/GnomeSubtitles/Dialog/Unmanaged/SaveConfirmationDialog.cs 
b/src/GnomeSubtitles/Dialog/Unmanaged/SaveConfirmationDialog.cs
index 7ace94a..990878c 100644
--- a/src/GnomeSubtitles/Dialog/Unmanaged/SaveConfirmationDialog.cs
+++ b/src/GnomeSubtitles/Dialog/Unmanaged/SaveConfirmationDialog.cs
@@ -27,13 +27,13 @@ namespace GnomeSubtitles.Dialog.Unmanaged {
 
 public abstract class SaveConfirmationDialog : WarningDialog {
        private SubtitleTextType textType;
-       
+
        /* Strings */
        private string secondaryText = Catalog.GetString("If you don't save, all your changes will be 
permanently lost.");
 
        public SaveConfirmationDialog (string primaryText, SubtitleTextType textType) : base() {
                this.textType = textType;
-       
+
                string filename = String.Empty;
                if (textType == SubtitleTextType.Text)
                        filename = Base.Document.TextFile.Filename;
@@ -41,26 +41,26 @@ public abstract class SaveConfirmationDialog : WarningDialog {
                        filename = Base.Document.TranslationFile.Filename;
                else
                        filename = Base.Document.UnsavedTranslationFilename;
-               
+
                SetText(primaryText, secondaryText, filename);
        }
-       
-       
+
+
        /* Abstract methods */
-       
+
        protected abstract string GetRejectLabel ();
-       
+
 
        /* Protected methods */
-       
+
        protected override void AddButtons () {
                string rejectLabel = GetRejectLabel();
                dialog.AddButton(rejectLabel, ResponseType.Reject);
                dialog.AddButton(Stock.Cancel, ResponseType.Cancel);
                dialog.AddButton(Stock.Save, ResponseType.Accept);
        }
-       
-       
+
+
        /* Event members */
 
        protected override bool ProcessResponse (ResponseType response) {
@@ -90,13 +90,13 @@ public class SaveSubtitlesOnNewFileConfirmationDialog : SaveConfirmationDialog {
 
        public SaveSubtitlesOnNewFileConfirmationDialog () : base(primaryText, SubtitleTextType.Text) {
        }
-       
+
        public SaveSubtitlesOnNewFileConfirmationDialog (string primaryText, SubtitleTextType textType) : 
base(primaryText, textType) {
        }
-       
-       
+
+
        /* Protected methods */
-       
+
        protected override string GetRejectLabel ()
        {
                return rejectLabel;
@@ -127,12 +127,12 @@ public class SaveSubtitlesOnOpenFileConfirmationDialog : SaveConfirmationDialog
 
        public SaveSubtitlesOnOpenFileConfirmationDialog () : base(primaryText, SubtitleTextType.Text) {
        }
-       
+
        public SaveSubtitlesOnOpenFileConfirmationDialog (string primaryText, SubtitleTextType textType) : 
base (primaryText, textType) {
        }
-       
+
        /* Protected methods */
-       
+
        protected override string GetRejectLabel ()
        {
                return rejectLabel;
@@ -156,12 +156,12 @@ public class SaveSubtitlesOnCloseFileConfirmationDialog : SaveConfirmationDialog
 
        public SaveSubtitlesOnCloseFileConfirmationDialog () : base(primaryText, SubtitleTextType.Text) {
        }
-       
+
        public SaveSubtitlesOnCloseFileConfirmationDialog (string primaryText, SubtitleTextType textType) : 
base(primaryText, textType) {
        }
-       
+
        /* Protected methods */
-       
+
        protected override string GetRejectLabel ()
        {
                return rejectLabel;
diff --git a/src/GnomeSubtitles/Dialog/Unmanaged/SubtitleFileOpenErrorDialog.cs 
b/src/GnomeSubtitles/Dialog/Unmanaged/SubtitleFileOpenErrorDialog.cs
index e7e6bec..d724990 100644
--- a/src/GnomeSubtitles/Dialog/Unmanaged/SubtitleFileOpenErrorDialog.cs
+++ b/src/GnomeSubtitles/Dialog/Unmanaged/SubtitleFileOpenErrorDialog.cs
@@ -31,7 +31,7 @@ public class SubtitleFileOpenErrorDialog : FileOpenErrorDialog {
        }
 
        /* Overriden members */
-       
+
        protected override string SecondaryTextFromException (Exception exception) {
                if (exception is UnknownSubtitleFormatException)
                        return Catalog.GetString("Unable to detect the subtitle format. Please check that the 
file type is supported.");
diff --git a/src/GnomeSubtitles/Dialog/Unmanaged/VideoErrorDialog.cs 
b/src/GnomeSubtitles/Dialog/Unmanaged/VideoErrorDialog.cs
index a026381..14764a0 100644
--- a/src/GnomeSubtitles/Dialog/Unmanaged/VideoErrorDialog.cs
+++ b/src/GnomeSubtitles/Dialog/Unmanaged/VideoErrorDialog.cs
@@ -33,11 +33,11 @@ public class VideoErrorDialog : FileOpenErrorDialog {
        }
 
        /* Overriden members */
-       
+
        protected override string GetPrimaryText (string filename) {
                return primaryTextStart + " " + filename + ".";
        }
-       
+
        protected override string SecondaryTextFromException (Exception exception) {
                if (exception is PlayerEngineException)
                        return (exception as PlayerEngineException).Error;
diff --git a/src/GnomeSubtitles/Dialog/Unmanaged/WarningDialog.cs 
b/src/GnomeSubtitles/Dialog/Unmanaged/WarningDialog.cs
index 27f77da..e1d341d 100644
--- a/src/GnomeSubtitles/Dialog/Unmanaged/WarningDialog.cs
+++ b/src/GnomeSubtitles/Dialog/Unmanaged/WarningDialog.cs
@@ -24,7 +24,7 @@ using System;
 namespace GnomeSubtitles.Dialog.Unmanaged {
 
 public abstract class WarningDialog : MessageDialog {
-       
+
        public WarningDialog () : base(MessageType.Warning) {
        }
 
diff --git a/src/GnomeSubtitles/Dialog/Util.cs b/src/GnomeSubtitles/Dialog/Util.cs
index bbe3374..11643e9 100644
--- a/src/GnomeSubtitles/Dialog/Util.cs
+++ b/src/GnomeSubtitles/Dialog/Util.cs
@@ -23,12 +23,12 @@ using Gtk;
 namespace GnomeSubtitles.Dialog {
 
 public class Util {
-       
+
        public static void SetBaseWindow (Gtk.Dialog dialog, Window window) {
                dialog.TransientFor = window;
                dialog.Icon = window.Icon;
        }
-       
+
        public static void SetBaseWindowFromUi (Gtk.Dialog dialog) {
                SetBaseWindow(dialog, Base.Ui.Window);
        }
diff --git a/src/GnomeSubtitles/Dialog/VideoOpenDialog.cs b/src/GnomeSubtitles/Dialog/VideoOpenDialog.cs
index ac4d68c..3d24883 100644
--- a/src/GnomeSubtitles/Dialog/VideoOpenDialog.cs
+++ b/src/GnomeSubtitles/Dialog/VideoOpenDialog.cs
@@ -27,11 +27,11 @@ namespace GnomeSubtitles.Dialog {
 public class VideoOpenDialog : GladeDialog {
        protected FileChooserDialog dialog = null;
        private Uri chosenUri = null;
-       
+
        /* Constant strings */
        private const string gladeFilename = "VideoOpenDialog.glade";
-       
-       
+
+
        public VideoOpenDialog () : base(gladeFilename) {
                dialog = GetDialog() as FileChooserDialog;
 
@@ -42,13 +42,13 @@ public class VideoOpenDialog : GladeDialog {
 
                SetFilters();
        }
-       
+
        /* Public properties */
 
        public Uri Uri {
                get { return chosenUri; }
        }
-       
+
        /* Private methods */
 
        private void SetFilters () {
@@ -60,7 +60,7 @@ public class VideoOpenDialog : GladeDialog {
                videoFilesFilter.AddMimeType("application/vnd.rn-realmedia"); //support for real media files 
(currently includes rmvb)
                videoFilesFilter.AddMimeType("application/vnd.rn-realmedia-vbr"); //this should be the real 
mime type for rmvb files
                dialog.AddFilter(videoFilesFilter);
-               
+
                /* Audio files */
                FileFilter audioFilesFilter = new FileFilter();
                audioFilesFilter.Name = Catalog.GetString("All Audio Files");
@@ -68,19 +68,19 @@ public class VideoOpenDialog : GladeDialog {
                audioFilesFilter.AddMimeType("application/ogg");
                dialog.AddFilter(audioFilesFilter);
 
-               
+
                /* All files */
                FileFilter allFilesFilter = new FileFilter();
                allFilesFilter.Name = Catalog.GetString("All Files");
                allFilesFilter.AddPattern("*");
-               dialog.AddFilter(allFilesFilter);               
-               
+               dialog.AddFilter(allFilesFilter);
+
                /* Set active filter */
                dialog.Filter = videoFilesFilter;
        }
 
        /* Event members */
-       
+
        #pragma warning disable 169             //Disables warning about handlers not being used
 
        protected override bool ProcessResponse (ResponseType response) {
diff --git a/src/GnomeSubtitles/Dialog/VideoSeekToDialog.cs b/src/GnomeSubtitles/Dialog/VideoSeekToDialog.cs
index 9e46ca1..c5dd28d 100644
--- a/src/GnomeSubtitles/Dialog/VideoSeekToDialog.cs
+++ b/src/GnomeSubtitles/Dialog/VideoSeekToDialog.cs
@@ -52,7 +52,7 @@ public class VideoSeekToDialog : GladeDialog {
                base.Show ();
        }
 
-       
+
        /* Private methods */
 
        private void InitSpinButton () {
@@ -76,13 +76,13 @@ public class VideoSeekToDialog : GladeDialog {
                        SetSpinButtonValue(Base.Ui.Video.Position.CurrentFrames);
                }
        }
-       
+
        private void SetSpinButtonValue (double newValue) {
                spinButton.Value = newValue;
        }
 
        #pragma warning disable 169             //Disables warning about handlers not being used
-       
+
        private void OnClear (object o, EventArgs args) {
                SetSpinButtonValue(0);
        }
diff --git a/src/GnomeSubtitles/Execution/BugReporter.cs b/src/GnomeSubtitles/Execution/BugReporter.cs
index a0f07e8..0102aea 100644
--- a/src/GnomeSubtitles/Execution/BugReporter.cs
+++ b/src/GnomeSubtitles/Execution/BugReporter.cs
@@ -49,7 +49,7 @@ public class BugReporter {
        }
 
        #region Private members
-       
+
        private static void RunBugBuddy (string bugInfo) {
                string path = WriteBugInfo(bugInfo);
 
@@ -60,7 +60,7 @@ public class BugReporter {
 
                process.Start();
        }
-       
+
        private static string GetBugInfo (string message) {
                return "Gnome Subtitles version: " + Base.ExecutionContext.Version + "\n"
                        + "GtkSharp version: " + Base.ExecutionContext.GtkSharpVersion + "\n"
@@ -69,7 +69,7 @@ public class BugReporter {
                        + "Stack trace:" + "\n"
                        + message;
        }
-       
+
        private static string WriteBugInfo (string bugInfo) {
                string path = GetTempPath();
                File.WriteAllText(path, bugInfo);
@@ -85,13 +85,13 @@ public class BugReporter {
                catch (IOException) {
                        //Don't do anything, a random name will be chosen next
                }
-               
+
                /* Could not get path in the previous method, trying alternative */
                Random random = new Random();
                int number = random.Next(10000);
                return Path.GetTempPath() + Path.DirectorySeparatorChar + number + ".tmp";
        }
-       
+
        #endregion
 
 }
diff --git a/src/GnomeSubtitles/Execution/Executable.cs b/src/GnomeSubtitles/Execution/Executable.cs
index e415455..1e18add 100644
--- a/src/GnomeSubtitles/Execution/Executable.cs
+++ b/src/GnomeSubtitles/Execution/Executable.cs
@@ -48,7 +48,7 @@ public class Executable {
         }
         return true;
        }
-       
+
        public static bool SetProcessNameSetproctitle (string name) {
                try {
                        setproctitle(Encoding.ASCII.GetBytes("%s\0"), Encoding.ASCII.GetBytes(name + "\0"));
@@ -78,7 +78,7 @@ public class Executable {
 
                Base.Run(executionContext);
        }
-       
+
        /* Private members */
 
        /// <summary>Kills the window in the most quick and unfriendly way.</summary>
@@ -87,13 +87,13 @@ public class Executable {
                        Base.Kill();
                }
                catch (Exception) {
-                       ; //Nothing to do if there were errors while killing the window 
+                       ; //Nothing to do if there were errors while killing the window
                }
        }
 
-       
+
        /* Event members */
-       
+
        private static void OnUnhandledException (UnhandledExceptionArgs args) {
                if (args.ExceptionObject is Exception)
                        BugReporter.Report(args.ExceptionObject as Exception);
diff --git a/src/GnomeSubtitles/Execution/ExecutionContext.cs 
b/src/GnomeSubtitles/Execution/ExecutionContext.cs
index 8cfe277..4c2d38a 100644
--- a/src/GnomeSubtitles/Execution/ExecutionContext.cs
+++ b/src/GnomeSubtitles/Execution/ExecutionContext.cs
@@ -36,9 +36,9 @@ public class ExecutionContext {
        private string localeDir = String.Empty;
        private bool platformIsWindows = false;
        private bool platformIsUnix = false;
-       
+
        private string[] args = null;
-       
+
        public ExecutionContext (string[] args) {
                this.args = args;
 
@@ -61,21 +61,21 @@ public class ExecutionContext {
                                break;
                }
        }
-       
+
        /* Public properties */
-       
+
        public bool Initialized {
                get { return initialized; }
        }
-       
+
        public string ApplicationName {
                get { return applicationName; }
        }
-       
+
        public string ApplicationID {
                get { return applicationID; }
        }
-       
+
        public string ExecutableName {
                get { return applicationID; }
        }
@@ -84,7 +84,7 @@ public class ExecutionContext {
        public string LocaleDir {
                get { return localeDir; }
        }
-       
+
        public string Version {
                get { return 
RemoveTrailingZeros(Assembly.GetExecutingAssembly().GetName().Version.ToString()); }
        }
@@ -96,7 +96,7 @@ public class ExecutionContext {
        public string GladeSharpVersion {
                get { return RemoveTrailingZeros(Assembly.Load("glade-sharp").GetName().Version.ToString()); }
        }
-       
+
        public string GConfSharpVersion {
                get { return RemoveTrailingZeros(Assembly.Load("gconf-sharp").GetName().Version.ToString()); }
        }
@@ -105,7 +105,7 @@ public class ExecutionContext {
                get { return args; }
                set { args = value; }
        }
-       
+
        public string TranslationDomain {
                get { return applicationID; }
        }
@@ -117,33 +117,33 @@ public class ExecutionContext {
        public bool PlatformIsUnix {
                get { return platformIsUnix; }
        }
-       
+
 
        /* Public methods */
-       
+
        public void InitApplication () {
-               if (!initialized) {     
+               if (!initialized) {
                        initialized = true;
                        Application.Init();
                }
        }
-       
+
        public void RunApplication () {
                if (initialized && (!running)) {
                        running = true;
                        Application.Run();
                }
        }
-       
+
        public void QuitApplication () {
                initialized = false;
                running = false;
                Application.Quit();
        }
-       
+
 
        /* Private methods */
-       
+
        private string RemoveTrailingZeros (string version) {
                while (version.EndsWith(".0")) {
                        version = version.Remove(version.Length - 2);
diff --git a/src/GnomeSubtitles/Ui/Component/EncodingComboBox.cs 
b/src/GnomeSubtitles/Ui/Component/EncodingComboBox.cs
index f3645c5..150d230 100644
--- a/src/GnomeSubtitles/Ui/Component/EncodingComboBox.cs
+++ b/src/GnomeSubtitles/Ui/Component/EncodingComboBox.cs
@@ -55,9 +55,9 @@ public class EncodingComboBox {
 
 
        /* Events */
-       
+
        public event EventHandler SelectionChanged;
-       
+
 
        /* Public properties */
 
@@ -113,7 +113,7 @@ public class EncodingComboBox {
        private void LoadEncodings () {
                bool toAddFixedEncoding = (fixedEncoding != -1);
                ArrayList encodings = new ArrayList();
-               
+
                foreach (string name in configShownEncodings) {
                        EncodingDescription description = EncodingDescription.Empty;
                        if (Encodings.Find(name, ref description)) {
@@ -126,7 +126,7 @@ public class EncodingComboBox {
                if (toAddFixedEncoding) {
                        EncodingDescription description = EncodingDescription.Empty;
                        if (Encodings.Find(fixedEncoding, ref description))
-                               encodings.Add(description);             
+                               encodings.Add(description);
                }
 
                encodings.Sort();
@@ -200,7 +200,7 @@ public class EncodingComboBox {
        }
 
        /* Event members */
-       
+
        #pragma warning disable 169             //Disables warning about handlers not being used
 
        private void ConnectHandlers () {
diff --git a/src/GnomeSubtitles/Ui/Component/NewlineTypeComboBox.cs 
b/src/GnomeSubtitles/Ui/Component/NewlineTypeComboBox.cs
index 7528d77..6cfa9c8 100644
--- a/src/GnomeSubtitles/Ui/Component/NewlineTypeComboBox.cs
+++ b/src/GnomeSubtitles/Ui/Component/NewlineTypeComboBox.cs
@@ -69,7 +69,7 @@ public class NewlineTypeComboBox {
                set {
                        int actionCount = GetActionCount();
                        int position = (int)value - 1 + (actionCount > 0 ? actionCount + 1 : 0);
-                       this.ActiveSelection = position;        
+                       this.ActiveSelection = position;
                }
        }
 
@@ -155,7 +155,7 @@ public class NewlineTypeComboBox {
 
 
        /* Event members */
-       
+
        #pragma warning disable 169             //Disables warning about handlers not being used
 
        private void ConnectHandlers () {
diff --git a/src/GnomeSubtitles/Ui/Component/SubtitleFormatComboBox.cs 
b/src/GnomeSubtitles/Ui/Component/SubtitleFormatComboBox.cs
index 5f71c79..749cf12 100644
--- a/src/GnomeSubtitles/Ui/Component/SubtitleFormatComboBox.cs
+++ b/src/GnomeSubtitles/Ui/Component/SubtitleFormatComboBox.cs
@@ -136,7 +136,7 @@ public class SubtitleFormatComboBox {
 
 
        /* Event members */
-       
+
        #pragma warning disable 169             //Disables warning about handlers not being used
 
        private void ConnectHandlers () {
diff --git a/src/GnomeSubtitles/Ui/Edit/SubtitleEdit.cs b/src/GnomeSubtitles/Ui/Edit/SubtitleEdit.cs
index dc8093a..e64ba8f 100644
--- a/src/GnomeSubtitles/Ui/Edit/SubtitleEdit.cs
+++ b/src/GnomeSubtitles/Ui/Edit/SubtitleEdit.cs
@@ -39,7 +39,7 @@ public class SubtitleEdit {
                spinButtons = new SubtitleEditSpinButtons();
                textEdit = new SubtitleEditText(Base.GetWidget(WidgetNames.SubtitleEditText) as TextView);
                translationEdit = new 
SubtitleEditTranslation(Base.GetWidget(WidgetNames.SubtitleEditTranslation) as TextView);
-               
+
                Base.InitFinished += OnBaseInitFinished;
     }
 
@@ -53,19 +53,19 @@ public class SubtitleEdit {
                                hBox.Sensitive = value;
        }
     }
-    
+
     public SubtitleEditText TextEdit {
        get { return textEdit; }
     }
-    
+
     public SubtitleEditTranslation TranslationEdit {
        get { return translationEdit; }
     }
-    
+
     public SubtitleEditSpinButtons SpinButtons {
        get { return spinButtons; }
     }
-    
+
     /// <summary>The current text selection, either text or translation. An empty string if no text is 
selected.</summary>
     public string SelectedTextContent {
                get {
@@ -76,21 +76,21 @@ public class SubtitleEdit {
                                return translationEdit.Selection;
                }
        }
-    
+
     public bool TextOrTranslationIsFocus {
        get { return textEdit.IsFocus || translationEdit.IsFocus; }
     }
-    
+
     /* Public methods */
 
     public void GetEditableWidgets (out SpinButton startSpinButton, out SpinButton endSpinButton,
                out SpinButton durationSpinButton, out TextView textEdit, out TextView translationEdit) {
-       
+
        spinButtons.GetWidgets(out startSpinButton, out endSpinButton, out durationSpinButton);
        textEdit = this.textEdit.TextView;
        translationEdit = this.translationEdit.TextView;
     }
-       
+
        public bool GetTextSelectionBounds (out int start, out int end, out SubtitleTextType textType) {
        if (textEdit.IsFocus) {
                textType = SubtitleTextType.Text;
@@ -104,17 +104,17 @@ public class SubtitleEdit {
                textType = SubtitleTextType.Text;
                start = -1;
                end = -1;
-               return false;           
+               return false;
        }
     }
-    
+
     public void TextFocusOnSelection (int startIndex, int endIndex, SubtitleTextType textType) {
        if (textType == SubtitleTextType.Text)
                textEdit.FocusOnSelection(startIndex, endIndex);
        else
                translationEdit.FocusOnSelection(startIndex, endIndex);
     }
-    
+
     public void ReplaceSelection (string replacement) {
        if (textEdit.IsFocus)
                textEdit.ReplaceSelection(replacement);
@@ -122,13 +122,13 @@ public class SubtitleEdit {
                translationEdit.ReplaceSelection(replacement);
     }
 
-    
+
     /* Event members */
-    
+
     private void OnBaseInitFinished () {
        Base.Ui.View.Selection.Changed += OnSubtitleSelectionChanged;
     }
-    
+
     private void OnSubtitleSelectionChanged (TreePath[] paths, Subtitle subtitle) {
                this.Enabled = (subtitle != null);
        }
diff --git a/src/GnomeSubtitles/Ui/Edit/SubtitleEditSpinButtons.cs 
b/src/GnomeSubtitles/Ui/Edit/SubtitleEditSpinButtons.cs
index df666f5..23ddd24 100644
--- a/src/GnomeSubtitles/Ui/Edit/SubtitleEditSpinButtons.cs
+++ b/src/GnomeSubtitles/Ui/Edit/SubtitleEditSpinButtons.cs
@@ -32,7 +32,7 @@ public class SubtitleEditSpinButtons {
        private SpinButton startSpinButton = null;
        private SpinButton endSpinButton = null;
        private SpinButton durationSpinButton = null;
-       
+
        /* Constants */
        private const int maxTime = 86399999; //milliseconds
        private const int maxFrames = 3000000;
@@ -43,18 +43,18 @@ public class SubtitleEditSpinButtons {
                startSpinButton = Base.GetWidget(WidgetNames.StartSpinButton) as SpinButton;
                endSpinButton = Base.GetWidget(WidgetNames.EndSpinButton) as SpinButton;
                durationSpinButton = Base.GetWidget(WidgetNames.DurationSpinButton) as SpinButton;
-               
+
                /* Initialize */
                startSpinButton.WidthChars = Util.SpinButtonTimeWidthChars;
                endSpinButton.WidthChars = Util.SpinButtonTimeWidthChars;
                durationSpinButton.WidthChars = Util.SpinButtonTimeWidthChars;
-       
+
        /* Set timing mode to Times */
        SetTimingMode(TimingMode.Times); //Initial timing mode is Times
-       
+
        Base.InitFinished += OnBaseInitFinished;
        }
-       
+
        /* Public methods */
 
        public void LoadTimings () {
@@ -66,13 +66,13 @@ public class SubtitleEditSpinButtons {
                LoadEndTiming(subtitle);
                LoadDurationTiming(subtitle);
     }
-    
+
     public void GetWidgets (out SpinButton startSpinButton, out SpinButton endSpinButton, out SpinButton 
durationSpinButton) {
        startSpinButton = this.startSpinButton;
        endSpinButton = this.endSpinButton;
        durationSpinButton = this.durationSpinButton;
     }
-    
+
     public void StartSpinButtonIncreaseStep () {
        startSpinButton.Spin(SpinType.StepForward, 0); //0 uses the defined stepIncrement
     }
@@ -80,7 +80,7 @@ public class SubtitleEditSpinButtons {
     public void StartSpinButtonDecreaseStep () {
        startSpinButton.Spin(SpinType.StepBackward, 0); //0 uses the defined stepIncrement
     }
-    
+
     public void EndSpinButtonIncreaseStep () {
        endSpinButton.Spin(SpinType.StepForward, 0); //0 uses the defined stepIncrement
     }
@@ -91,30 +91,30 @@ public class SubtitleEditSpinButtons {
 
 
        /* Private methods */
-       
+
        private void SetTimingMode (TimingMode mode) {
                if (mode == timingMode) //Only set if it's not already set
                        return;
-                       
-               timingMode = mode;      
+
+               timingMode = mode;
                if (mode == TimingMode.Frames)
                        SetFramesMode();
                else
                        SetTimesMode();
        }
-       
+
        private void SetFramesMode () {
                SetFramesMode(startSpinButton, false);
            SetFramesMode(endSpinButton, false);
            SetFramesMode(durationSpinButton, true);
        }
-       
+
        private void SetTimesMode () {
            SetTimesMode(startSpinButton, false);
            SetTimesMode(endSpinButton, false);
            SetTimesMode(durationSpinButton, true);
        }
-    
+
     private void SetTimesMode (SpinButton spinButton, bool allowNegatives) {
                Util.SetSpinButtonTimingMode(spinButton, TimingMode.Times);
 
@@ -131,10 +131,10 @@ public class SubtitleEditSpinButtons {
        spinButton.Adjustment.Upper = maxFrames;
        spinButton.Adjustment.Lower = (allowNegatives ? -maxFrames : 0);
        }
-       
+
        private void LoadStartTiming (Subtitle subtitle) {
        startSpinButton.ValueChanged -= OnStartValueChanged;
-               
+
        if (timingMode == TimingMode.Frames)
                startSpinButton.Value = subtitle.Frames.Start;
        else
@@ -142,10 +142,10 @@ public class SubtitleEditSpinButtons {
 
                startSpinButton.ValueChanged += OnStartValueChanged;
        }
-       
+
        private void LoadEndTiming (Subtitle subtitle) {
                endSpinButton.ValueChanged -= OnEndValueChanged;
-               
+
        if (timingMode == TimingMode.Frames)
                endSpinButton.Value = subtitle.Frames.End;
        else
@@ -153,7 +153,7 @@ public class SubtitleEditSpinButtons {
 
                endSpinButton.ValueChanged += OnEndValueChanged;
        }
-       
+
        private void LoadDurationTiming (Subtitle subtitle) {
        durationSpinButton.ValueChanged -= OnDurationValueChanged;
 
@@ -164,7 +164,7 @@ public class SubtitleEditSpinButtons {
 
        durationSpinButton.ValueChanged += OnDurationValueChanged;
     }
-    
+
        private void ClearFields () {
         DisconnectSpinButtonsChangedSignals();
                startSpinButton.Text = String.Empty;
@@ -172,48 +172,48 @@ public class SubtitleEditSpinButtons {
                durationSpinButton.Text = String.Empty;
        ConnectSpinButtonsChangedSignals();
     }
-    
-    
+
+
     /* Event methods */
-    
+
        private void ConnectSpinButtonsChangedSignals () {
        startSpinButton.ValueChanged += OnStartValueChanged;
        endSpinButton.ValueChanged += OnEndValueChanged;
        durationSpinButton.ValueChanged += OnDurationValueChanged;
     }
-    
+
     private void DisconnectSpinButtonsChangedSignals () {
        startSpinButton.ValueChanged -= OnStartValueChanged;
                endSpinButton.ValueChanged -= OnEndValueChanged;
                durationSpinButton.ValueChanged -= OnDurationValueChanged;
        }
-       
+
        private void OnStartValueChanged (object o, EventArgs args) {
                if (Base.TimingModeIsFrames)
                        Base.CommandManager.Execute(new ChangeStartCommand((int)startSpinButton.Value, true));
                else
                        Base.CommandManager.Execute(new 
ChangeStartCommand(TimeSpan.FromMilliseconds(startSpinButton.Value), true));
        }
-       
+
        private void OnEndValueChanged (object o, EventArgs args) {
                if (Base.TimingModeIsFrames)
                        Base.CommandManager.Execute(new ChangeEndCommand((int)endSpinButton.Value, true));
                else
                        Base.CommandManager.Execute(new 
ChangeEndCommand(TimeSpan.FromMilliseconds(endSpinButton.Value), true));
        }
-       
+
        private void OnDurationValueChanged (object o, EventArgs args) {
                if (Base.TimingModeIsFrames)
                        Base.CommandManager.Execute(new ChangeDurationCommand((int)durationSpinButton.Value, 
true));
                else
                        Base.CommandManager.Execute(new 
ChangeDurationCommand(TimeSpan.FromMilliseconds(durationSpinButton.Value), true));
        }
-       
+
        private void OnBaseInitFinished () {
                Base.TimingModeChanged += OnBaseTimingModeChanged;
                Base.Ui.View.Selection.Changed += OnSubtitleSelectionChanged;
        }
-       
+
        private void OnBaseTimingModeChanged (TimingMode newTimingMode) {
        if (timingMode == newTimingMode)
                        return;
@@ -221,7 +221,7 @@ public class SubtitleEditSpinButtons {
                SetTimingMode(newTimingMode);
                LoadTimings();
     }
-    
+
     private void OnSubtitleSelectionChanged (TreePath[] paths, Subtitle subtitle) {
        if (subtitle != null)
                LoadTimings();
diff --git a/src/GnomeSubtitles/Ui/Edit/SubtitleEditText.cs b/src/GnomeSubtitles/Ui/Edit/SubtitleEditText.cs
index 6c00e51..ffb5d6f 100644
--- a/src/GnomeSubtitles/Ui/Edit/SubtitleEditText.cs
+++ b/src/GnomeSubtitles/Ui/Edit/SubtitleEditText.cs
@@ -30,54 +30,54 @@ public class SubtitleEditText : SubtitleEditTextView {
        public SubtitleEditText (TextView textView) : base(textView) {
                Base.InitFinished += OnBaseInitFinished;
        }
-       
+
        protected override SubtitleTextType GetTextType () {
                return SubtitleTextType.Text;
        }
-       
+
        protected override void ChangeSubtitleTextContent (Subtitle subtitle, string text) {
                subtitle.Text.Set(text);
        }
-       
+
        protected override string GetSubtitleTextContent (Subtitle subtitle) {
                return subtitle.Text.Get();
        }
-       
+
        protected override void ExecuteInsertCommand (int index, string text) {
                Base.CommandManager.Execute(new InsertTextCommand(index, text));
        }
-       
+
        protected override void ExecuteDeleteCommand (int index, string text, int cursor) {
                Base.CommandManager.Execute(new DeleteTextCommand(index, text, cursor));
        }
-       
+
        protected override SpellLanguage GetSpellActiveLanguage () {
                return Base.SpellLanguages.ActiveTextLanguage;
        }
-       
+
        /* Event members */
-       
+
        private void OnBaseInitFinished () {
                Base.Ui.Edit.TranslationEdit.ToggleOverwrite += OnTranslationEditToggleOverwrite;
 
                Base.DocumentLoaded += OnBaseDocumentLoaded;
                Base.DocumentUnloaded += OnBaseDocumentUnloaded;
        }
-       
+
        private void OnTranslationEditToggleOverwrite (object o, EventArgs args) {
                ToggleOverwriteSilent();
        }
-       
+
        private void OnBaseDocumentLoaded (Document document) {
                Base.Ui.View.Selection.Changed += OnSubtitleSelectionChanged;
-               
+
                Base.SpellLanguages.ToggleEnabled += OnSpellToggleEnabled;
                Base.SpellLanguages.TextLanguageChanged += OnSpellLanguageChanged;
        }
-       
+
        private void OnBaseDocumentUnloaded (Document document) {
                Base.Ui.View.Selection.Changed -= OnSubtitleSelectionChanged;
-               
+
                Base.SpellLanguages.ToggleEnabled += OnSpellToggleEnabled;
                Base.SpellLanguages.TextLanguageChanged += OnSpellLanguageChanged;
        }
diff --git a/src/GnomeSubtitles/Ui/Edit/SubtitleEditTextView.cs 
b/src/GnomeSubtitles/Ui/Edit/SubtitleEditTextView.cs
index f25b9a4..bb9b473 100644
--- a/src/GnomeSubtitles/Ui/Edit/SubtitleEditTextView.cs
+++ b/src/GnomeSubtitles/Ui/Edit/SubtitleEditTextView.cs
@@ -33,14 +33,14 @@ public abstract class SubtitleEditTextView {
        private bool isBufferInsertManual = false; //used to indicate whether there were manual (not by the 
user) inserts to the buffer
        private bool isBufferDeleteManual = false; //used to indicate whether there were manual (not by the 
user) inserts to the buffer
        private bool isToggleOverwriteSilent = false; //used to indicate whether an overwrite toggle was 
manual
-       
+
        /* Constants */
        private String textFont = "sans";
        private int textFontSize = 14;
-       
+
        /* Text tags */
        private TextTag underlineTag = new TextTag("underline");
-       
+
        /* Other */
        private Subtitle subtitle = null;
        private IntPtr spellTextView = IntPtr.Zero;
@@ -57,37 +57,37 @@ public abstract class SubtitleEditTextView {
 
                Base.InitFinished += OnBaseInitFinished;
        }
-       
+
        /* Abstract members */
-       
+
        protected abstract SubtitleTextType GetTextType ();
        protected abstract void ChangeSubtitleTextContent (Subtitle subtitle, string text);
        protected abstract string GetSubtitleTextContent (Subtitle subtitle);
        protected abstract void ExecuteInsertCommand (int index, string insertion);
        protected abstract void ExecuteDeleteCommand (int index, string deletion, int cursor);
        protected abstract SpellLanguage GetSpellActiveLanguage ();
-       
+
        /* Events */
        public event EventHandler ToggleOverwrite = null;
-               
+
        /* Public properties */
 
        public TextView TextView {
                get { return textView; }
        }
-       
+
        public bool Enabled {
                get { return textView.Sensitive; }
        }
-       
+
     public bool IsFocus {
-       get { return textView.IsFocus; }    
+       get { return textView.IsFocus; }
     }
-    
+
     public bool OverwriteStatus {
        get { return textView.Overwrite; }
     }
-       
+
        /// <summary>The text that is currently selected, or <see cref="Selection.Empty" /> if no text is 
selected.</summary>
     public string Selection {
        get {
@@ -101,12 +101,12 @@ public abstract class SubtitleEditTextView {
                        return String.Empty;
        }
     }
-       
+
        /* Public methods */
-       
+
        public void LoadSubtitle (Subtitle subtitle) {
                this.subtitle = subtitle;
-               
+
                SetFont(subtitle.Style);
                SetText(GetSubtitleTextContent(subtitle));
                ApplyTags();
@@ -125,11 +125,11 @@ public abstract class SubtitleEditTextView {
 
        isBufferInsertManual = false;
        }
-       
+
        public void DeleteText (int startIndex, int endIndex) {
                TextBuffer buffer = this.textView.Buffer;
                isBufferDeleteManual = true;
-               
+
                buffer.BeginUserAction();
                GrabFocus();
                TextIter start = buffer.GetIterAtOffset(startIndex);
@@ -144,17 +144,17 @@ public abstract class SubtitleEditTextView {
        GrabFocus();
                TextIter start = this.textView.Buffer.GetIterAtOffset(startIndex);
                TextIter end = this.textView.Buffer.GetIterAtOffset(endIndex);
-               this.textView.Buffer.SelectRange(start, end);           
+               this.textView.Buffer.SelectRange(start, end);
     }
-       
+
        public void ReplaceSelection (string replacement) {
        TextBuffer buffer = this.textView.Buffer;
        buffer.BeginUserAction();
        buffer.DeleteSelection(true, true);
        buffer.InsertAtCursor(replacement);
-       buffer.EndUserAction();    
+       buffer.EndUserAction();
     }
-    
+
     /// <summary>Gets the bounds of the current selection, if text is selected.</summary>
        /// <param name="start">The start index of the selection.</param>
        /// <param name="end">The end index of the selection.</param>
@@ -184,24 +184,24 @@ public abstract class SubtitleEditTextView {
 
        [DllImport ("libgtkspell")]
        static extern bool gtkspell_set_language (IntPtr textView, string lang, IntPtr error);
-       
+
        private void GtkSpellDetach () {
                if (IsGtkSpellAttached()) {
                        gtkspell_detach(spellTextView);
                        spellTextView = IntPtr.Zero;
                }
        }
-       
+
        private void GtkSpellAttach () {
                if (!IsGtkSpellAttached()) {
                        spellTextView = gtkspell_new_attach(textView.Handle, null, IntPtr.Zero);
                }
        }
-       
+
        private bool IsGtkSpellAttached () {
                return (spellTextView != IntPtr.Zero);
        }
-       
+
        private bool GtkSpellSetLanguage (SpellLanguage language) {
                if (language == null) {
                        if (IsGtkSpellAttached()) {
@@ -216,11 +216,11 @@ public abstract class SubtitleEditTextView {
                        bool result = gtkspell_set_language(spellTextView, language.ID, IntPtr.Zero);
                        if (!result)
                                GtkSpellDetach();
-                       
+
                        return result;
                }
        }
-       
+
 
        /* Private methods */
 
@@ -228,44 +228,44 @@ public abstract class SubtitleEditTextView {
        isBufferChangeSilent = true;
        isBufferInsertManual = true;
        isBufferDeleteManual = true;
-       
+
        this.textView.Buffer.Text = text;
-       
+
        isBufferChangeSilent = false;
        isBufferInsertManual = false;
        isBufferDeleteManual = false;
     }
-    
+
     /// <summary>Sets font with bold and italic if applicable.</summary>
     private void SetFont (SubLib.Core.Domain.Style style) {
        Pango.FontDescription font = Pango.FontDescription.FromString(this.textFont + (style.Bold ? " bold" : 
String.Empty) + (style.Italic ? " italic" : String.Empty) + " " + this.textFontSize);
                this.textView.ModifyFont(font);
     }
-    
+
     /* Currently applies underline tag */
     private void ApplyTags () {
        if (this.subtitle.Style.Underline) {
                ApplyTag(this.underlineTag, this.textView.Buffer.StartIter, this.textView.Buffer.EndIter, 
true);
        }
     }
-    
+
     private void ApplyTag (TextTag tag, TextIter start, TextIter end, bool activate) {
                if (activate)
                        this.textView.Buffer.ApplyTag(tag, start, end);
                else
                        this.textView.Buffer.RemoveTag(tag, start, end);
     }
-            
+
     private TextIter GetIterAtInsertMark () {
        return this.textView.Buffer.GetIterAtMark(this.textView.Buffer.InsertMark);
     }
-    
+
     private void GetLineColumn (out int line, out int column) {
        TextIter iter = GetIterAtInsertMark();
                line = iter.Line + 1;
                column = iter.LineOffset + 1;
     }
-    
+
        private void UpdateLineColStatus () {
        if ((!Enabled) || (!IsFocus))
                return;
@@ -273,20 +273,20 @@ public abstract class SubtitleEditTextView {
                /* Get the cursor position */
                int line, column;
                GetLineColumn(out line, out column);
-               
+
                /* Update the status bar */
                Core.Base.Ui.Status.SetPosition(GetTextType(), line, column);
        }
-    
+
        private void UpdateOverwriteStatus () {
                Core.Base.Ui.Status.Overwrite = this.textView.Overwrite;
        }
-       
+
        private void PlaceCursor (int index) {
                TextIter iter = this.textView.Buffer.GetIterAtOffset(index);
                this.textView.Buffer.PlaceCursor(iter);
        }
-       
+
        /// <summary>Returns the cursor index, or -1 if the text view is not enabled.</summary>
     private int GetCursorIndex () {
        if (!this.Enabled)
@@ -300,14 +300,14 @@ public abstract class SubtitleEditTextView {
        private void GrabFocus () {
                this.textView.GrabFocus();
        }
-       
+
        private ScrolledWindow GetScrolledWindow () {
                return this.textView.Parent as ScrolledWindow;
        }
-       
-       
+
+
        /* Event members */
-       
+
        /// <summary>Toggles the overwrite status without emitting its event.</summary>
     protected void ToggleOverwriteSilent () {
        isToggleOverwriteSilent = true;
@@ -318,15 +318,15 @@ public abstract class SubtitleEditTextView {
        private void OnBufferChanged (object o, EventArgs args) {
                if (!isBufferChangeSilent)
                        ChangeSubtitleTextContent(subtitle, this.textView.Buffer.Text);
-               
+
                ApplyTags();
                UpdateLineColStatus();
        }
-       
+
        private void OnBufferMarkSet (object o, MarkSetArgs args) {
                UpdateLineColStatus();
        }
-       
+
        [GLib.ConnectBefore]
        private void OnBufferInsertText (object o, InsertTextArgs args) {
                if (!isBufferInsertManual) {
@@ -334,33 +334,33 @@ public abstract class SubtitleEditTextView {
                        string insertion = args.Text;
                        ExecuteInsertCommand(index, insertion);
                }
-               
-               ApplyTags();            
+
+               ApplyTags();
                UpdateLineColStatus();
        }
-       
+
        [GLib.ConnectBefore]
        private void OnBufferDeleteRange (object o, DeleteRangeArgs args) {
                if (!isBufferDeleteManual) {
                        int index = args.Start.Offset;
                        int length = args.End.Offset - index;
                        string deletion = this.textView.Buffer.Text.Substring(index, length);
-                       ExecuteDeleteCommand(index, deletion, GetCursorIndex()); 
+                       ExecuteDeleteCommand(index, deletion, GetCursorIndex());
                }
        }
-       
+
     private void OnFocusIn (object o, FocusInEventArgs args) {
        UpdateLineColStatus();
                UpdateOverwriteStatus();
-               
+
                Core.Base.Ui.Menus.SetPasteSensitivity(true);
        }
-       
+
        private void OnFocusOut (object o, FocusOutEventArgs args) {
                Core.Base.Ui.Menus.SetPasteSensitivity(false);
        Core.Base.Ui.Status.ClearEditRelatedStatus();
        }
-       
+
        private void OnToggleOverwrite (object o, EventArgs args) {
                /* Update the GUI overwrite status */
        UpdateOverwriteStatus();
@@ -369,17 +369,17 @@ public abstract class SubtitleEditTextView {
                if (!isToggleOverwriteSilent)
                        EmitToggleOverwrite();
        }
-       
+
        private void OnDestroyed (object o, EventArgs args) {
                GtkSpellDetach();
        }
-       
+
        [GLib.ConnectBefore]
     private void OnKeyPressed (object o, KeyPressEventArgs args) {
        Gdk.Key key = args.Event.Key;
        Gdk.ModifierType modifier = args.Event.State;
        Gdk.ModifierType controlModifier = Gdk.ModifierType.ControlMask;
-       
+
        if ((modifier & controlModifier) == controlModifier) { //Control was pressed
                switch (key) {
                        case Gdk.Key.Page_Up:
@@ -395,15 +395,15 @@ public abstract class SubtitleEditTextView {
                }
        }
     }
-    
+
     private void OnBaseInitFinished () {
-    
+
                /* Buffer signals */
                this.textView.Buffer.Changed += OnBufferChanged;
                this.textView.Buffer.MarkSet += OnBufferMarkSet;
                this.textView.Buffer.InsertText += OnBufferInsertText;
                this.textView.Buffer.DeleteRange += OnBufferDeleteRange;
-               
+
                /* TextView signals */
                this.textView.FocusInEvent += OnFocusIn;
                this.textView.FocusOutEvent += OnFocusOut;
@@ -411,21 +411,21 @@ public abstract class SubtitleEditTextView {
                this.textView.ToggleOverwrite += OnToggleOverwrite;
                this.textView.Destroyed += OnDestroyed;
     }
-    
+
     private void EmitToggleOverwrite () {
        if (this.ToggleOverwrite != null)
                this.ToggleOverwrite(this, EventArgs.Empty);
     }
-    
+
     /* Protected members */
-    
+
     protected void OnSpellLanguageChanged () {
                if (Base.SpellLanguages.Enabled) {
                        SpellLanguage language = GetSpellActiveLanguage();
                        GtkSpellSetLanguage(language);
                }
        }
-               
+
        protected void OnSpellToggleEnabled () {
                bool enabled = Base.SpellLanguages.Enabled;
                if (enabled) {
@@ -443,16 +443,16 @@ public abstract class SubtitleEditTextView {
        else
                ClearFields();
     }
-       
+
        protected void SetVisibility (bool visible) {
                GetScrolledWindow().Visible = visible;
                if (!visible) {
                        ClearFields();
                }
        }
-       
+
        protected void ClearFields () {
-               SetText(String.Empty);  
+               SetText(String.Empty);
        }
 
 }
diff --git a/src/GnomeSubtitles/Ui/Edit/SubtitleEditTextViewMargin.cs 
b/src/GnomeSubtitles/Ui/Edit/SubtitleEditTextViewMargin.cs
index df1655b..e4451e5 100644
--- a/src/GnomeSubtitles/Ui/Edit/SubtitleEditTextViewMargin.cs
+++ b/src/GnomeSubtitles/Ui/Edit/SubtitleEditTextViewMargin.cs
@@ -29,7 +29,7 @@ public class SubtitleEditTextViewMargin {
        private int marginSpace = 4; //pixels
        private int marginMinDigits = 2; //the minimum number of digits for margin width (1 would make the 
margin adjust with more than 9 chars, so it's better to keep a minimum of 2 to avoid constant adjustment
        private int marginDigitCount = 2;
-       
+
        /* Cached GCs and Pango Layout */
        private Gdk.GC lineGC = null;
        private Gdk.GC textGC = null;
@@ -37,17 +37,17 @@ public class SubtitleEditTextViewMargin {
 
        /* Widgets */
        private TextView textView = null;
-       
+
        public SubtitleEditTextViewMargin (TextView textView) {
                this.textView = textView;
-               
+
                Base.InitFinished += OnBaseInitFinished;
        }
-       
+
        /* Private methods */
-       
+
        public void DrawMargin (TextView textView) {
-       
+
        /* Get char count info  */
        int[,] info;
        GetCharCountDrawInfo(textView, out info);
@@ -57,16 +57,16 @@ public class SubtitleEditTextViewMargin {
        textView.SetBorderWindowSize(TextWindowType.Right, marginWidth);
        Gdk.Window window = textView.GetWindow(TextWindowType.Right);
        window.Clear();
-       
+
        /* Draw line */
        window.DrawLine(this.lineGC, 0, 0, 0, textView.Allocation.Height);
-       
+
        /* Draw text */
        int infoCount = info.GetLength(0);
        for (int i = 0 ; i < infoCount ; i++) {
                int charCount = info[i, 0];
                int y = info[i, 1];
-               
+
                this.textLayout.SetText(charCount.ToString());
                int textLayoutWidth, textLayoutHeight;
                this.textLayout.GetPixelSize(out textLayoutWidth, out textLayoutHeight);
@@ -79,11 +79,11 @@ public class SubtitleEditTextViewMargin {
                info = null;
                return; //shouldn't happen, but just to make sure
        }
-       
-       /* Get visible coordinates */   
+
+       /* Get visible coordinates */
        int minVisibleY = textView.VisibleRect.Top;
                int maxVisibleY = textView.VisibleRect.Bottom;
-               
+
                /* Get visible start and end iters */
                TextIter startIter, endIter;
                int lineTop;
@@ -95,13 +95,13 @@ public class SubtitleEditTextViewMargin {
 
                /* Initializations */
                info = new int[lineCount, 2];
-       
+
        /* Process start iter */
        int startLineCharCount = startIter.CharsInLine - (lineCount > 1 ? 1 : 0); //subtract 1 for newline if 
there are >1 lines
        info[0, 0] = startLineCharCount; //Char Count
        Gdk.Rectangle startIterLocation = textView.GetIterLocation(startIter);
        info[0, 1] = startIterLocation.Bottom - (startIterLocation.Height/2) - minVisibleY; //Y
-       
+
        /* If only 1 line, return */
        if (lineCount == 1) {
                return;
@@ -115,14 +115,14 @@ public class SubtitleEditTextViewMargin {
                        Gdk.Rectangle iterLocation = textView.GetIterLocation(iter);
                info[i, 1] = iterLocation.Bottom - (iterLocation.Height/2) - minVisibleY; //Y
        }
-       
+
        /* Process end iter */
        int endLineCharCount = endIter.CharsInLine - (endLine == textView.Buffer.LineCount - 1 ? 0 : 1); 
//subtract newline if this isn't the last line in the buffer
        info[lineCount-1, 0] = endLineCharCount;
        Gdk.Rectangle endIterLocation = textView.GetIterLocation(endIter);
        info[lineCount-1, 1] = endIterLocation.Bottom - (endIterLocation.Height/2) - minVisibleY; //Y
     }
-               
+
        private int CalcDigitCount (TextBuffer buffer, int marginMinDigits) {
                int maxChars = -1;
                int lineCount = buffer.LineCount;
@@ -133,55 +133,55 @@ public class SubtitleEditTextViewMargin {
                                maxChars = chars;
                        }
                }
-               
+
                int digitCount = CountDigitsInNumber(maxChars);
                return Math.Max(digitCount, this.marginMinDigits);
        }
-    
+
     private int CountDigitsInNumber (int number) {
        return (number == 0 ? 1 : (int)Math.Floor(Math.Log10(number)) + 1); //assuming the number is 
positive, otherwise would need to use abs() too
     }
-    
+
     private void SetGCs () {
                this.lineGC = Base.Ui.Window.Style.BackgroundGC(StateType.Active);
                this.textGC = Base.Ui.Window.Style.TextGC(StateType.Active);
     }
-    
+
     private void Refresh () {
        textView.QueueDraw();
     }
-    
+
     private void HideMarginWindow () {
        this.textView.SetBorderWindowSize(TextWindowType.Right, 0);
     }
-    
+
     private void Enable () {
        textView.ExposeEvent += OnExposeEvent;
                textView.Buffer.Changed += OnBufferChanged; //To calculate margin digit count (based on the 
largest line char count)
                textView.StateChanged += OnStateChanged;
-               
+
                Refresh();
     }
-    
+
     private void Disable () {
        textView.ExposeEvent -= OnExposeEvent;
                textView.Buffer.Changed -= OnBufferChanged; //To calculate margin digit count (based on the 
largest line char count)
                textView.StateChanged -= OnStateChanged;
-               
+
                HideMarginWindow();
     }
-   
-       
+
+
        /* Event members */
-       
+
        private void OnBaseInitFinished () {
                /* GCs */
                SetGCs();
-               
+
                /* Layouts */
                this.textLayout = new Pango.Layout(textView.PangoContext);
                this.textLayout.FontDescription = Pango.FontDescription.FromString("sans 10");
-               
+
                /* Margin char width */
                this.textLayout.SetText("8"); //To calculate a character's width
                int marginCharHeight;
@@ -194,29 +194,29 @@ public class SubtitleEditTextViewMargin {
                        Enable();
                }
        }
-       
+
        private void OnExposeEvent (object o, ExposeEventArgs args) {
                TextView textView = o as TextView;
                if (textView.State != StateType.Insensitive) {
                        DrawMargin(textView);
                }
        }
-       
+
        private void OnBufferChanged (object o, EventArgs args) {
                this.marginDigitCount = CalcDigitCount(o as TextBuffer, this.marginMinDigits);
        }
-       
+
        private void OnStyleSet (object o, StyleSetArgs args) {
                SetGCs();
        }
-       
+
        private void OnStateChanged (object o, StateChangedArgs args) {
                TextView textView = o as TextView;
                if (textView.State == StateType.Insensitive) {
                        HideMarginWindow();
                }
        }
-       
+
        private void OnViewLineLengthsToggled (object o, EventArgs args) {
        CheckMenuItem menuItem = o as CheckMenuItem;
        if (menuItem.Active)
@@ -225,7 +225,7 @@ public class SubtitleEditTextViewMargin {
                Disable();
        }
 
-       
+
 }
 
 }
diff --git a/src/GnomeSubtitles/Ui/Edit/SubtitleEditTranslation.cs 
b/src/GnomeSubtitles/Ui/Edit/SubtitleEditTranslation.cs
index aa7c9ec..9114449 100644
--- a/src/GnomeSubtitles/Ui/Edit/SubtitleEditTranslation.cs
+++ b/src/GnomeSubtitles/Ui/Edit/SubtitleEditTranslation.cs
@@ -30,15 +30,15 @@ public class SubtitleEditTranslation : SubtitleEditTextView {
        public SubtitleEditTranslation (TextView textView) : base(textView) {
                Base.InitFinished += OnBaseInitFinished;
        }
-       
+
        protected override SubtitleTextType GetTextType () {
                return SubtitleTextType.Translation;
        }
-       
+
        protected override void ChangeSubtitleTextContent (Subtitle subtitle, string text) {
                subtitle.Translation.Set(text);
        }
-       
+
        protected override string GetSubtitleTextContent (Subtitle subtitle) {
                return subtitle.Translation.Get();
        }
@@ -50,42 +50,42 @@ public class SubtitleEditTranslation : SubtitleEditTextView {
        protected override void ExecuteDeleteCommand (int index, string text, int cursor) {
                Base.CommandManager.Execute(new DeleteTranslationCommand(index, text, cursor));
        }
-       
+
        protected override SpellLanguage GetSpellActiveLanguage () {
                return Base.SpellLanguages.ActiveTranslationLanguage;
        }
-       
+
        /* Event members */
 
        private void OnBaseInitFinished () {
                Base.Ui.Edit.TextEdit.ToggleOverwrite += OnTextEditToggleOverwrite;
-               
+
                Base.TranslationLoaded += OnBaseTranslationLoaded;
                Base.TranslationUnloaded += OnBaseTranslationUnloaded;
        }
-       
+
        private void OnBaseTranslationLoaded () {
                Base.Ui.View.Selection.Changed += OnSubtitleSelectionChanged;
-               
+
        Base.SpellLanguages.ToggleEnabled += OnSpellToggleEnabled;
                Base.SpellLanguages.TranslationLanguageChanged += OnSpellLanguageChanged;
-               
+
                SetVisibility(true);
        }
-       
+
        private void OnBaseTranslationUnloaded () {
                Base.Ui.View.Selection.Changed -= OnSubtitleSelectionChanged;
-               
+
                Base.SpellLanguages.ToggleEnabled -= OnSpellToggleEnabled;
                Base.SpellLanguages.TranslationLanguageChanged -= OnSpellLanguageChanged;
-               
+
        SetVisibility(false);
        }
-       
+
        private void OnTextEditToggleOverwrite (object o, EventArgs args) {
                ToggleOverwriteSilent();
        }
-       
+
 
 }
 
diff --git a/src/GnomeSubtitles/Ui/MainUi.cs b/src/GnomeSubtitles/Ui/MainUi.cs
index 369444d..b288dfc 100644
--- a/src/GnomeSubtitles/Ui/MainUi.cs
+++ b/src/GnomeSubtitles/Ui/MainUi.cs
@@ -45,10 +45,10 @@ public class MainUi {
        /* Constant strings */
        private const string gladeFilename = "MainWindow.glade";
        private const string iconFilename = "gnome-subtitles.svg";
-       
+
        public MainUi (EventHandlers handlers, out Glade.XML glade) {
                glade = new Glade.XML(null, gladeFilename, null, Base.ExecutionContext.TranslationDomain);
-               
+
                window = glade.GetWidget("window") as Window;
                window.Icon = new Gdk.Pixbuf(null, iconFilename);
                window.SetDefaultSize(Base.Config.PrefsWindowWidth, Base.Config.PrefsWindowHeight);
@@ -61,10 +61,10 @@ public class MainUi {
 
                glade.Autoconnect(handlers);
                Base.InitFinished += OnBaseInitFinished;
-               
+
                window.Visible = true;
     }
-    
+
 
        /* Public properties */
 
@@ -75,26 +75,26 @@ public class MainUi {
        public Menus Menus {
                get { return menus; }
        }
-       
+
        public Video Video {
                get { return video; }
        }
-       
+
        public SubtitleView View {
                get { return view; }
        }
-       
+
        public SubtitleEdit Edit {
                get { return edit; }
        }
-       
+
        public Status Status {
                get { return status; }
        }
 
-    
+
     /* Public Methods */
-    
+
     /// <summary>Starts the GUI</summary>
     /// <remarks>A file is opened if it was specified as argument. If it wasn't, a blank start is 
performed.</summary>
     public void Start () {
@@ -106,19 +106,19 @@ public class MainUi {
                        Open(subtitleFile, codePage, videoUri);
                }
     }
-    
+
     /// <summary>Closes the open file.</summary>
     public void Close () {
                if (ToCloseAfterWarning())
                        Base.CloseDocument();
     }
-    
+
     /// <summary>Quits the application.</summary>
     public void Quit () {
                if (ToCloseAfterWarning())
                        Base.Quit();
     }
-    
+
        /// <summary>Kills the window in the most quick and unfriendly way.</summary>
     public void Kill () {
                window.Destroy();
@@ -133,7 +133,7 @@ public class MainUi {
                else
                        Base.NewDocument();
     }
-    
+
     /// <summary>Shows the open dialog and possibly opens a subtitle.</summary>
     /// <remarks>If there's a document currently open with unsaved changes, a warning dialog
     /// is shown before opening the new file.</remarks>
@@ -158,9 +158,9 @@ public class MainUi {
                        Open(filename, -1, null);
                }
     }
-        
+
     public void OpenVideo () {
-               
+
        VideoOpenDialog dialog = Base.Dialogs.Get(typeof(VideoOpenDialog)) as VideoOpenDialog;
        dialog.Show();
                bool toOpen = dialog.WaitForResponse();
@@ -168,7 +168,7 @@ public class MainUi {
                        Base.OpenVideo(dialog.Uri);
                }
     }
-    
+
     /// <summary>Executes a Save operation.</summary>
     /// <remarks>If the document hasn't been saved before, a SaveAs is executed.</remarks>
     /// <returns>Whether the file was saved.</returns>
@@ -194,7 +194,7 @@ public class MainUi {
                else
                        return false;
        }
-       
+
        /// <summary>Starts a new translation.</summary>
        /// <remarks>If there's a translation open with unsaved changes, a warning dialog is shown.</remarks>
     public void TranslationNew () {
@@ -203,7 +203,7 @@ public class MainUi {
 
                Base.NewTranslation();
     }
-    
+
     /// <summary>Shows the open translation dialog and possibly opens a file.</summary>
     /// <remarks>If there's a translation currently open with unsaved changes, a warning dialog
     /// is shown before opening the new file.</remarks>
@@ -217,7 +217,7 @@ public class MainUi {
                OpenTranslation(filename, codePage);
        }
     }
-    
+
     /// <summary>Executes a Save operation regarding the translation.</summary>
     /// <remarks>If the translation hasn't been saved before, a TranslationSaveAs is executed.</remarks>
     /// <returns>Whether the translation file was saved or not.</returns>
@@ -229,7 +229,7 @@ public class MainUi {
                else
                        return TranslationSaveAs();
     }
-    
+
     /// <summary>Executes a translation SaveAs operation.</summary>
     /// <returns>Whether the translation file was saved or not.</returns>
     public bool TranslationSaveAs () {
@@ -254,7 +254,7 @@ public class MainUi {
 
 
        /* Private members */
-       
+
        /// <summary>Opens a subtitle file, given its filename, code page and video filename.</summary>
        /// <param name="path">The path of the subtitles file to open.</param>
        /// <param name="codePage">The code page of the filename. To use autodetection, set it to -1.</param>
@@ -273,7 +273,7 @@ public class MainUi {
                                Open();
                }
     }
-    
+
     /// <summary>Creates an <see cref="Encoding" /> from a code page.</summary>
     /// <param name="codePage">The code page.</param>
     /// <returns>The respective <see cref="Encoding" />, or null if codePage == -1.</returns>
@@ -323,7 +323,7 @@ public class MainUi {
                        }
                }
        }
-       
+
        private void SaveTranslation (FileProperties fileProperties) {
                try {
                        Base.Document.SaveTranslation(fileProperties);
@@ -333,10 +333,10 @@ public class MainUi {
                        errorDialog.Show();
                        bool toSaveAgain = errorDialog.WaitForResponse();
                if (toSaveAgain)
-                       TranslationSaveAs();                    
+                       TranslationSaveAs();
                }
        }
-       
+
        /// <summary>Displays a SaveAs dialog and gets the chosen options as <cref="FileProperties" 
/>.</summary>
        /// <param name="dialog">The dialog to display.</param>
        /// <returns>The chosen file properties, or null in case SaveAs was canceled.</returns>
@@ -345,10 +345,10 @@ public class MainUi {
                bool toSaveAs = dialog.WaitForResponse();
                if (!toSaveAs)
                        return null;
-               
+
                string path = dialog.Filename;
                Encoding encoding = Encoding.GetEncoding(dialog.Encoding.CodePage);
-               SubtitleType subtitleType = dialog.SubtitleType;                        
+               SubtitleType subtitleType = dialog.SubtitleType;
                NewlineType newlineType = dialog.NewlineType;
                TimingMode timingMode = Base.TimingMode;
                return new FileProperties(path, encoding, subtitleType, timingMode, newlineType);
@@ -358,7 +358,7 @@ public class MainUi {
        private bool ExistTextUnsavedChanges () {
                return Base.IsDocumentLoaded && Base.Document.WasTextModified;
        }
-       
+
        /// <summary>Whether there are unsaved translation changes.</summary>
        private bool ExistTranslationUnsavedChanges () {
                return Base.IsDocumentLoaded && Base.Document.IsTranslationLoaded && 
Base.Document.WasTranslationModified;
@@ -375,7 +375,7 @@ public class MainUi {
                        SaveConfirmationDialog translationDialog = new 
SaveTranslationOnCloseConfirmationDialog();
                        toCreate = translationDialog.WaitForResponse();
                }
-       return toCreate; 
+       return toCreate;
        }
 
     /// <summary>Whether a new document should be created, after choosing the respective confirmation 
dialog.</summary>
@@ -391,7 +391,7 @@ public class MainUi {
                }
                return toCreate;
        }
-       
+
        /// <summary>Whether a document should be opened, after choosing the respective confirmation 
dialog.</summary>
        private bool ToOpenAfterWarning () {
                bool toCreate = true;
@@ -413,9 +413,9 @@ public class MainUi {
                        return dialog.WaitForResponse();
                }
                else
-               return true; 
+               return true;
        }
-       
+
        /// <summary>Whether a translation should be opened, after choosing the respective confirmation 
dialog.</summary>
        private bool ToOpenTranslationAfterWarning () {
                if (ExistTranslationUnsavedChanges()) {
@@ -423,9 +423,9 @@ public class MainUi {
                        return dialog.WaitForResponse();
                }
                else
-               return true; 
+               return true;
        }
-       
+
        /// <summary>Whether a translation should be closed, after choosing the respective confirmation 
dialog.</summary>
     private bool ToCloseTranslationAfterWarning () {
                if (ExistTranslationUnsavedChanges()) {
@@ -433,9 +433,9 @@ public class MainUi {
                        return dialog.WaitForResponse();
                }
                else
-               return true; 
+               return true;
        }
-       
+
        private void UpdateTitleModificationStatus (bool showFilename, bool modified) {
                if (showFilename) {
                        string prefix = (modified ? "*" : String.Empty);
@@ -458,24 +458,24 @@ public class MainUi {
 
 
        /* Event members */
-       
+
        private void OnBaseInitFinished () {
                Base.DocumentLoaded += OnBaseDocumentLoaded;
                Base.DocumentUnloaded += OnBaseDocumentUnloaded;
        }
-       
+
        private void OnBaseDocumentLoaded (Document document) {
                UpdateTitleModificationStatus(true, false);
                document.ModificationStatusChanged += OnBaseDocumentModificationStatusChanged;
     }
-    
+
     private void OnBaseDocumentUnloaded (Document document) {
        if (document != null) {
                document.ModificationStatusChanged -= OnBaseDocumentModificationStatusChanged;
        }
        UpdateTitleModificationStatus(false, false);
     }
-    
+
     private void OnBaseDocumentModificationStatusChanged (bool modified) {
        UpdateTitleModificationStatus(true, modified);
        }
diff --git a/src/GnomeSubtitles/Ui/Menus.cs b/src/GnomeSubtitles/Ui/Menus.cs
index 25db2d5..a459872 100644
--- a/src/GnomeSubtitles/Ui/Menus.cs
+++ b/src/GnomeSubtitles/Ui/Menus.cs
@@ -36,13 +36,13 @@ public class Menus {
                SetToolbarHomogeneity(); //TODO needed until homogeneity definition in glade starts working
                SetDocumentSensitivity(false);
                SetBlankActivity();
-       
+
                Base.InitFinished += OnBaseInitFinished;
        }
-       
-       
+
+
        /* Public properties */
-       
+
        public float TimingsInputFrameRateActive {
                get {
                        Menu menu = Base.GetWidget(WidgetNames.TimingsInputFrameRateMenu) as Menu;
@@ -54,22 +54,22 @@ public class Menus {
                        return -1;
                }
        }
-       
-       
+
+
        /* Public methods */
-       
+
        public void SetCutCopySensitivity (bool sensitivity) {
                SetSensitivity(WidgetNames.EditCut, sensitivity);
                SetSensitivity(WidgetNames.EditCopy, sensitivity);
                SetSensitivity(WidgetNames.CutButton, sensitivity);
-               SetSensitivity(WidgetNames.CopyButton, sensitivity);            
+               SetSensitivity(WidgetNames.CopyButton, sensitivity);
        }
-       
+
        public void SetPasteSensitivity (bool sensitivity) {
                SetSensitivity(WidgetNames.EditPaste, sensitivity);
                SetSensitivity(WidgetNames.PasteButton, sensitivity);
        }
-       
+
        public void UpdateActiveInputFrameRateMenuItem (bool toggleHandlers) {
                float inputFrameRate = Base.Document.Subtitles.Properties.OriginalFrameRate;
                if (toggleHandlers)
@@ -77,40 +77,40 @@ public class Menus {
                else
                        SetCheckMenuItemActivity(InputFrameRateMenuItem(inputFrameRate), true);
        }
-       
+
        /* Note: this method makes the assumption that the OnTimingsVideoFrameRateToggled event handler is 
connected to the
           menu item, as it is disconnected and then connected again after changing the active menu item. */
        public void UpdateActiveVideoFrameRateMenuItem () {
                float videoFrameRate = Base.Document.Subtitles.Properties.CurrentFrameRate;
                SetCheckMenuItemActivity(VideoFrameRateMenuItem(videoFrameRate), true, 
OnTimingsVideoFrameRateToggled);
        }
-       
+
        public void EnableFindNextPrevious () {
                SetSensitivity(WidgetNames.SearchFindNext, true);
                SetSensitivity(WidgetNames.SearchFindPrevious, true);
        }
-       
+
        public void AddFrameRateVideoTag (float frameRate) {
                if (frameRate <= 0)
                        return;
-       
+
                string menuItemName = FrameRateToMenuItem(frameRate, "Video");
                string menuItemText = GetMenuItemText(menuItemName);
-               
+
                menuItemText += " (" + videoTagText + ")";
-               SetMenuItemText(menuItemName, menuItemText);    
+               SetMenuItemText(menuItemName, menuItemText);
        }
-       
+
        public void RemoveFrameRateVideoTag () {
                Menu menu = Base.GetWidget(WidgetNames.TimingsVideoFrameRateMenu) as Menu;
                foreach (Widget child in menu.Children) {
                        if (!(child is MenuItem))
                                continue;
-                       
+
                        MenuItem menuItem = child as MenuItem;
                        string text = GetMenuItemText(menuItem);
                        string videoTagSuffix = GetVideoTagSuffix();
-                       
+
                        int tagIndex = text.LastIndexOf(videoTagSuffix);
                        if (tagIndex > 0) {
                                text = text.Substring(0, tagIndex);
@@ -118,14 +118,14 @@ public class Menus {
                        }
                }
        }
-       
+
        public MenuItem GetMenuItem (string widgetName) {
                return Base.GetWidget(WidgetNames.ViewLineLengths) as MenuItem;
        }
 
-       
+
        /* Private members */
-       
+
        /// <summary>Sets the sensitivity depending on 1 or more selected subtitles.</summary>
        /// <param name="selectionCount">The number of selected subtitles.</param>
        /// <param name="sensitivity">Whether the items are set sensitive.</param>
@@ -136,7 +136,7 @@ public class Menus {
                SetSensitivity(WidgetNames.EditMerge, selectionCount >= 2);
                SetSensitivity(WidgetNames.DeleteSubtitlesButton, sensitivity);
        }
-       
+
        /// <summary>Sets the sensitivity depending on exactly 1 selected subtitle.</summary>
        /// <param name="sensitivity">Whether the items are set sensitive.</param>
        private void SetOneSelectionDependentSensitivity (bool sensitivity) {
@@ -144,7 +144,7 @@ public class Menus {
                SetSensitivity(WidgetNames.ToolsTranslateText, sensitivity && 
Base.Document.IsTranslationLoaded);
                SetSensitivity(WidgetNames.ToolsTranslateTranslation, sensitivity && 
Base.Document.IsTranslationLoaded);
        }
-       
+
        private void SetSubtitleCountDependentSensitivity (int count) {
                if (count == 0) {
                        SetSensitivity(WidgetNames.TimingsAdjust, false);
@@ -157,21 +157,21 @@ public class Menus {
                else {
                        SetSensitivity(WidgetNames.TimingsAdjust, true);
                        SetSensitivity(WidgetNames.TimingsShift, true);
-               }       
+               }
        }
 
        private void SetBlankActivity () {
                SetCheckMenuItemActivity(WidgetNames.ToolsAutocheckSpelling, Base.SpellLanguages.Enabled);
                SetCheckMenuItemActivity(WidgetNames.ViewLineLengths, Base.Config.PrefsViewLineLengths);
        }
-       
+
        private void SetViewVideoActivity (bool activity) {
                SetCheckMenuItemActivity(WidgetNames.ViewVideo, activity);
        }
 
        private void SetDocumentSensitivity (bool documentLoaded) {
                /* Set Sensitivity that corresponds to the document loaded status */
-       
+
                /* File Menu */
                SetSensitivity(WidgetNames.FileSave, documentLoaded);
                SetSensitivity(WidgetNames.FileSaveAs, documentLoaded);
@@ -199,9 +199,9 @@ public class Menus {
                /* Toolbar */
                SetSensitivity(WidgetNames.SaveButton, documentLoaded);
                SetSensitivity(WidgetNames.InsertSubtitleButton, documentLoaded);
-               
+
                /* Set sensitivity that's only applicable when the document is not loaded */
-               
+
                if (!documentLoaded) {
                        /* Edit menu */
                        SetSensitivity(WidgetNames.EditDeleteSubtitles, false);
@@ -229,30 +229,30 @@ public class Menus {
                        SetStylesSensitivity(false);
                }
        }
-       
+
        private void SetTranslationSensitivity (bool sensitivity) {
                SetSensitivity(WidgetNames.FileTranslationSave, sensitivity);
                SetSensitivity(WidgetNames.FileTranslationSaveAs, sensitivity);
                SetSensitivity(WidgetNames.FileTranslationClose, sensitivity);
                SetSensitivity(WidgetNames.ToolsSetTranslationLanguage, sensitivity);
-               
+
                bool oneSubtitleSelected = (Core.Base.Ui.View.Selection.Count == 1);
                SetSensitivity(WidgetNames.ToolsTranslateText, sensitivity && oneSubtitleSelected);
                SetSensitivity(WidgetNames.ToolsTranslateTranslation, sensitivity && oneSubtitleSelected);
                SetViewVideoSubtitlesSensitivity();
        }
-               
+
        private void SetToolsAutocheckSpellingSensitivity (bool sensitivity) {
                SetSensitivity(WidgetNames.ToolsAutocheckSpelling, sensitivity);
        }
-       
+
        private void SetFrameRateMenus (bool documentLoaded) {
                if (documentLoaded) {
                        if (Base.TimingMode == TimingMode.Frames) {
                                UpdateActiveInputFrameRateMenuItem(false);
                                SetMenuSensitivity(WidgetNames.TimingsInputFrameRateMenu, true);
                                
SetFrameRateMenuHandlers(Base.GetWidget(WidgetNames.TimingsInputFrameRateMenu) as Menu, true, 
OnTimingsInputFrameRateToggled);
-                               
+
                                SetMenuSensitivity(WidgetNames.TimingsVideoFrameRateMenu, true);
                                
SetFrameRateMenuHandlers(Base.GetWidget(WidgetNames.TimingsVideoFrameRateMenu) as Menu, true, 
OnTimingsVideoFrameRateToggled);
                                UpdateActiveVideoFrameRateMenuItem();
@@ -273,7 +273,7 @@ public class Menus {
                        SetMenuSensitivity(WidgetNames.TimingsVideoFrameRateMenu, false);
                }
        }
-       
+
        private void SetStylesActivity (bool bold, bool italic, bool underline) {
                SetCheckMenuItemActivity(WidgetNames.EditFormatBold, bold, Base.Handlers.OnEditFormatBold);
                SetCheckMenuItemActivity(WidgetNames.EditFormatItalic, italic, 
Base.Handlers.OnEditFormatItalic);
@@ -282,21 +282,21 @@ public class Menus {
                SetToggleToolButtonActivity(WidgetNames.ItalicButton, italic, 
Base.Handlers.OnEditFormatItalic);
                SetToggleToolButtonActivity(WidgetNames.UnderlineButton, underline, 
Base.Handlers.OnEditFormatUnderline);
        }
-       
+
        private void SetActiveTimingMode (TimingMode mode) {
                if (mode == TimingMode.Times)
                        SetCheckMenuItemActivity(WidgetNames.ViewTimes, true);
                else
                        SetCheckMenuItemActivity(WidgetNames.ViewFrames, true);
-       }       
-               
+       }
+
        private void SetViewVideoSubtitlesActivity (bool isTextActive) {
                if (isTextActive)
                        SetCheckMenuItemActivity(WidgetNames.ViewVideoSubtitlesText, true);
                else
                        SetCheckMenuItemActivity(WidgetNames.ViewVideoSubtitlesTranslation, true);
        }
-       
+
        private void SetVideoSensitivity (bool sensitivity) {
                SetSensitivity(WidgetNames.VideoClose, sensitivity);
                SetSensitivity(WidgetNames.VideoPlayPause, sensitivity);
@@ -304,14 +304,14 @@ public class Menus {
                SetSensitivity(WidgetNames.VideoForward, sensitivity);
                SetSensitivity(WidgetNames.VideoSeekTo, sensitivity);
                SetVideoDocumentLoadedSensitivity(Base.IsDocumentLoaded);
-               
+
                /* Set video menu dependent sensitivity if there is 1 selected subtitle. */
                if ((Core.Base.Ui.View.Selection.Count == 1) && sensitivity)
                        SetVideoSelectionDependentSensitivity(true);
                else
                        SetVideoSelectionDependentSensitivity(false);
        }
-       
+
        private void SetStylesSensitivity (bool sensitivity) {
                if (Base.GetWidget(WidgetNames.EditFormatBold).Sensitive != sensitivity) {
                        SetSensitivity(WidgetNames.EditFormatBold, sensitivity);
@@ -320,9 +320,9 @@ public class Menus {
                        SetSensitivity(WidgetNames.BoldButton, sensitivity);
                        SetSensitivity(WidgetNames.ItalicButton, sensitivity);
                        SetSensitivity(WidgetNames.UnderlineButton, sensitivity);
-               }       
+               }
        }
-       
+
        /// <summary>Set the video selection dependent menu items.</summary>
        /// <param name="sensitivity">Whether to set the menu items sensitive.</param>
        /// <remarks>The menu items are only set sensitive if the video is loaded.</remarks>
@@ -338,19 +338,19 @@ public class Menus {
                        SetSensitivity(WidgetNames.VideoSetSubtitleEnd, false);
                }
        }
-       
+
        private void SetViewVideoSubtitlesSensitivity () {
                bool isVideoLoaded = (Base.Ui != null) && Base.Ui.Video.IsLoaded;
                bool textSensitivity = isVideoLoaded && Base.IsDocumentLoaded;
                bool translationSensitivity = isVideoLoaded && textSensitivity && 
Base.Document.IsTranslationLoaded;
-               SetViewVideoSubtitlesSensitivity(textSensitivity, translationSensitivity);      
+               SetViewVideoSubtitlesSensitivity(textSensitivity, translationSensitivity);
        }
-       
+
        private void SetViewVideoSubtitlesSensitivity (bool textSensitivity, bool translationSensitivity) {
                SetSensitivity(WidgetNames.ViewVideoSubtitlesText, textSensitivity);
                SetSensitivity(WidgetNames.ViewVideoSubtitlesTranslation, translationSensitivity);
        }
-       
+
        private void SetVideoDocumentLoadedSensitivity (bool isDocumentLoaded) {
                bool sensitivity = isDocumentLoaded && (Base.Ui != null) && Base.Ui.Video.IsLoaded;
                SetSensitivity(WidgetNames.VideoSelectNearestSubtitle, sensitivity);
@@ -358,37 +358,37 @@ public class Menus {
                SetSensitivity(WidgetNames.VideoAutoSelectSubtitles, sensitivity);
                SetSensitivity(WidgetNames.EditInsertSubtitleAtVideoPosition, sensitivity);
        }
-       
+
        private void SetCheckMenuItemActivity (string menuItemName, bool isActive) {
                (Base.GetWidget(menuItemName) as CheckMenuItem).Active = isActive;
        }
-       
+
        private void SetCheckMenuItemActivity (string menuItemName, bool isActive, EventHandler handler) {
                CheckMenuItem menuItem = Base.GetWidget(menuItemName) as CheckMenuItem;
                menuItem.Toggled -= handler;
                menuItem.Active = isActive;
                menuItem.Toggled += handler;
        }
-       
+
        private void SetToggleToolButtonActivity (string toggleToolButtonName, bool isActive, EventHandler 
handler) {
                ToggleToolButton toggleToolButton = Base.GetWidget(toggleToolButtonName) as ToggleToolButton;
                toggleToolButton.Toggled -= handler;
                toggleToolButton.Active = isActive;
-               toggleToolButton.Toggled += handler;            
+               toggleToolButton.Toggled += handler;
        }
-       
+
        private void SetSensitivity (string widgetName, bool isSensitive) {
                Widget widget = Base.GetWidget(widgetName);
                if (widget != null)
                        widget.Sensitive = isSensitive;
        }
-       
+
        private void SetMenuSensitivity (string menuName, bool sensitivity) {
                Menu menu = Base.GetWidget(menuName) as Menu;
                foreach (Widget widget in menu)
-                       widget.Sensitive = sensitivity; 
+                       widget.Sensitive = sensitivity;
        }
-               
+
        private void GetGlobalStyles (TreePath[] paths, out bool bold, out bool italic, out bool underline) {
                Ui.View.Subtitles subtitles = Base.Document.Subtitles;
                bold = true;
@@ -402,17 +402,17 @@ public class Menus {
                                italic = false;
                        if ((underline == true) && !subtitle.Style.Underline)
                                underline = false;
-               }               
+               }
        }
-       
+
        private string InputFrameRateMenuItem (float frameRate) {
                return FrameRateToMenuItem(frameRate, "Input");
        }
-       
+
        private string VideoFrameRateMenuItem (float frameRate) {
                return FrameRateToMenuItem(frameRate, "Video");
        }
-       
+
        private string FrameRateToMenuItem (float frameRate, string type) {
                int rate = 0;
                if (frameRate >= 30)
@@ -425,44 +425,44 @@ public class Menus {
                        rate = 24;
                else
                        rate = 23;
-               
+
                return "timings" + type + "FrameRate" + rate;
        }
-       
+
        private string GetMenuItemText (string menuItemName) {
                MenuItem menuItem = Base.GetWidget(menuItemName) as MenuItem;
                return GetMenuItemText(menuItem);
        }
-       
+
        private string GetMenuItemText (MenuItem menuItem) {
                Label label = menuItem.Child as Label;
                return label.Text;
        }
-       
+
        private void SetMenuItemText (string menuItemName, string text) {
                MenuItem menuItem = Base.GetWidget(menuItemName) as MenuItem;
                SetMenuItemText(menuItem, text);
        }
-       
+
        private void SetMenuItemText (MenuItem menuItem, string text) {
                Label label = menuItem.Child as Label;
-               label.Text = text;      
+               label.Text = text;
        }
-       
+
        private string GetVideoTagSuffix () {
                return " (" + videoTagText + ")";
        }
-       
+
        private void SetToolbarHomogeneity () {
                Toolbar toolbar = Base.GetWidget(WidgetNames.Toolbar) as Toolbar;
                Widget[] toolItems = toolbar.Children;
                foreach (Widget item in toolItems)
-                       (item as ToolItem).Homogeneous = false;         
+                       (item as ToolItem).Homogeneous = false;
        }
-       
+
        private void UpdateUndoRedoMessages () {
        CommandManager commandManager = Base.CommandManager;
-       
+
        /* Update undo messages */
        ToolButton undoButton = Base.GetWidget(WidgetNames.UndoButton) as ToolButton;
        if (commandManager.CanUndo) {
@@ -473,7 +473,7 @@ public class Menus {
        }
                else
                        ClearTooltip(undoButton);
-               
+
                /* Update redo messages */
                ToolButton redoButton = Base.GetWidget(WidgetNames.RedoButton) as ToolButton;
        if (commandManager.CanRedo) {
@@ -485,24 +485,24 @@ public class Menus {
        else
                ClearTooltip(redoButton);
     }
-    
+
     private void SetTooltip (Widget widget, string text) {
        widget.TooltipText = text;
     }
-    
+
     private void ClearTooltip (Widget widget) {
        SetTooltip(widget, null);
     }
-    
+
        private float FrameRateFromMenuItem (string menuItem) {
                string frameRateText = menuItem.Split(' ')[0];
                NumberFormatInfo invariant = NumberFormatInfo.InvariantInfo;
                return (float)Convert.ToDouble(frameRateText, invariant);
        }
-       
+
 
        /* Event members */
-       
+
        private void OnBaseInitFinished () {
                Base.DocumentLoaded += OnBaseDocumentLoaded;
                Base.DocumentUnloaded += OnBaseDocumentUnloaded;
@@ -518,19 +518,19 @@ public class Menus {
                Base.CommandManager.RedoToggled += OnCommandManagerRedoToggled;
                Base.CommandManager.CommandActivated += OnCommandManagerCommandActivated;
        }
-       
+
        private void OnBaseDocumentLoaded (Document document) {
                SetDocumentSensitivity(true);
                SetFrameRateMenus(true);
                SetActiveTimingMode(Base.TimingMode);
                SetCheckMenuItemActivity(WidgetNames.ToolsAutocheckSpelling, Base.SpellLanguages.Enabled);
        }
-       
+
        private void OnBaseDocumentUnloaded (Document document) {
                SetDocumentSensitivity(false);
                SetFrameRateMenus(false);
        }
-       
+
        private void OnBaseVideoLoaded (Uri videoUri) {
                SetVideoSensitivity(true);
        SetViewVideoSubtitlesSensitivity();
@@ -549,18 +549,18 @@ public class Menus {
        private void OnSubtitleViewCountChanged (int count) {
                SetSubtitleCountDependentSensitivity(count);
        }
-       
+
        private void OnBaseTranslationLoaded () {
                SetTranslationSensitivity(true);
                UpdateUndoRedoMessages();
        }
-       
+
        private void OnBaseTranslationUnloaded () {
                SetTranslationSensitivity(false);
        SetViewVideoSubtitlesActivity(true);
        UpdateUndoRedoMessages();
        }
-       
+
        private void OnSubtitleViewSelectionChanged (TreePath[] paths, Subtitle subtitle) {
                if (subtitle != null) {
                        /* One subtitle selected */
@@ -571,7 +571,7 @@ public class Menus {
                else {
                        SetOneSelectionDependentSensitivity(false);
                        int selectionCount = paths.Length;
-       
+
                        if (selectionCount == 0) {
                                /* No selection */
                                SetNonZeroSelectionDependentSensitivity(selectionCount, false);
@@ -582,40 +582,40 @@ public class Menus {
                                SetNonZeroSelectionDependentSensitivity(selectionCount, true);
                                bool bold, italic, underline;
                                GetGlobalStyles(paths, out bold, out italic, out underline);
-                               SetStylesActivity(bold, italic, underline);     
+                               SetStylesActivity(bold, italic, underline);
                        }
                }
        }
-       
+
        private void OnSpellLanguagesLanguageChanged () {
                SetToolsAutocheckSpellingSensitivity(true);
        }
-               
+
        private void OnCommandManagerUndoToggled (object o, EventArgs args)  {
                Widget button = Base.GetWidget(WidgetNames.UndoButton);
                button.Sensitive = !button.Sensitive;
-               
+
                MenuItem menuItem = Base.GetWidget(WidgetNames.EditUndo) as MenuItem;
                menuItem.Sensitive = !menuItem.Sensitive;
                if (!menuItem.Sensitive)
                        (menuItem.Child as Label).Text = Catalog.GetString("Undo");
        }
-    
+
        private void OnCommandManagerRedoToggled (object o, EventArgs args) {
        Widget button = Base.GetWidget(WidgetNames.RedoButton);
        button.Sensitive = !button.Sensitive;
-               
+
                MenuItem menuItem = Base.GetWidget(WidgetNames.EditRedo) as MenuItem;
        menuItem.Sensitive = !menuItem.Sensitive;
        if (!menuItem.Sensitive)
                        (menuItem.Child as Label).Text = Catalog.GetString("Redo");
     }
-    
+
     private void OnCommandManagerCommandActivated (object o, CommandActivatedArgs args) {
        UpdateUndoRedoMessages();
     }
-    
-       
+
+
        private void OnTimingsInputFrameRateToggled (object o, EventArgs args) {
                RadioMenuItem menuItem = o as RadioMenuItem;
                if (menuItem.Active) {
@@ -623,7 +623,7 @@ public class Menus {
                        Base.CommandManager.Execute(new ChangeInputFrameRateCommand(frameRate));
                }
        }
-       
+
        private void OnTimingsVideoFrameRateToggled (object o, EventArgs args) {
                RadioMenuItem menuItem = o as RadioMenuItem;
                if (menuItem.Active) {
@@ -636,7 +636,7 @@ public class Menus {
                foreach (RadioMenuItem menuItem in menu.Children) {
                        if (enable)
                                menuItem.Toggled += handler;
-                       else 
+                       else
                                menuItem.Toggled -= handler;
                }
        }
diff --git a/src/GnomeSubtitles/Ui/Status.cs b/src/GnomeSubtitles/Ui/Status.cs
index d26c2a3..efb40a2 100644
--- a/src/GnomeSubtitles/Ui/Status.cs
+++ b/src/GnomeSubtitles/Ui/Status.cs
@@ -47,12 +47,12 @@ public class Status {
        }
 
        /* Public methods */
-       
+
        public void ClearEditRelatedStatus () {
                ClearStatus(positionStatus);
                ClearStatus(overwriteStatus);
        }
-       
+
        public void SetPosition (SubtitleTextType textType, int lineNumber, int columnNumber) {
                //To translators: Trans corresponds to Translation (used here to denote whether text or 
translation is being edited).
                string type = (textType == SubtitleTextType.Text ? Catalog.GetString("Text") : 
Catalog.GetString("Trans"));
@@ -65,9 +65,9 @@ public class Status {
                ClearStatus(positionStatus);
                positionStatus.Push(0, message);
        }
-       
+
        /* Private methods */
-       
+
        private void ClearStatus (Statusbar statusBar) {
                statusBar.Pop(0);
        }
diff --git a/src/GnomeSubtitles/Ui/VideoPreview/Exceptions/PlayerEngineException.cs 
b/src/GnomeSubtitles/Ui/VideoPreview/Exceptions/PlayerEngineException.cs
index e391d31..8fe108a 100644
--- a/src/GnomeSubtitles/Ui/VideoPreview/Exceptions/PlayerEngineException.cs
+++ b/src/GnomeSubtitles/Ui/VideoPreview/Exceptions/PlayerEngineException.cs
@@ -24,26 +24,26 @@ namespace GnomeSubtitles.Ui.VideoPreview.Exceptions {
 public class PlayerEngineException : ApplicationException {
        private string error = String.Empty;
        private string debug = String.Empty;
-       
+
        public PlayerEngineException (string error, string debug) {
                this.error = error;
                this.debug = debug;
        }
-       
+
        /* Properties */
-       
+
        public string Error {
                get { return error; }
        }
-       
+
        public string Debug {
                get { return debug; }
        }
-       
+
        /* Public methods */
-       
+
        public override string ToString () {
-               return this.error + "; " + this.debug;  
+               return this.error + "; " + this.debug;
        }
 }
 
diff --git a/src/GnomeSubtitles/Ui/VideoPreview/Player.cs b/src/GnomeSubtitles/Ui/VideoPreview/Player.cs
index 48a4512..71b986d 100644
--- a/src/GnomeSubtitles/Ui/VideoPreview/Player.cs
+++ b/src/GnomeSubtitles/Ui/VideoPreview/Player.cs
@@ -30,7 +30,7 @@ public delegate void PlayerErrorEventHandler (Uri videoUri, Exception e);
 public delegate void VideoDurationEventHandler (TimeSpan duration);
 
 public class Player {
-    
+
        private AspectFrame frame = null;
        private Socket socket = null;
        private Playbin playbin = null;
@@ -53,8 +53,8 @@ public class Player {
                InitializePositionWatcher();
                InitializePlaybin();
        }
-       
-       
+
+
        /* Events */
        public event PlayerErrorEventHandler Error;
        public event EndOfStreamEventHandler EndOfStream;
@@ -80,11 +80,11 @@ public class Player {
        public bool HasVideoInfo {
                get { return videoInfo != null; }
        }
-       
+
        public float AspectRatio {
                get { return videoInfo.AspectRatio; }
        }
-       
+
        public float FrameRate {
                get { return videoInfo.FrameRate; }
        }
@@ -96,25 +96,25 @@ public class Player {
        public bool HasVideo {
                get { return videoInfo.HasVideo; }
        }
-       
+
        public Uri VideoUri {
                get { return videoUri; }
        }
-       
+
        public float Speed {
                get { return speed; }
        }
 
 
        /* Public methods */
-       
+
        public void Open (Uri videoUri) {
                this.videoUri = videoUri;
 
                /* Load the playbin */
                playbin.Load(videoUri.AbsoluteUri);
        }
-       
+
        public void Close () {
                position.Stop();
                playbin.Unload();
@@ -128,11 +128,11 @@ public class Player {
        public void Play () {
                playbin.Play();
        }
-       
+
        public void Pause () {
                playbin.Pause();
        }
-       
+
     public void SpeedUp () {
         if (this.speed >= DefaultMaxSpeed)
                return;
@@ -140,7 +140,7 @@ public class Player {
                this.speed += DefaultSpeedStep;
                ChangeSpeed(this.speed);
        }
-       
+
        public void SpeedDown () {
            if (this.speed <= DefaultMinSpeed)
                return;
@@ -148,28 +148,28 @@ public class Player {
            this.speed -= DefaultSpeedStep;
                ChangeSpeed(this.speed);
        }
-       
+
        public void SpeedReset () {
                this.speed = 1;
                ChangeSpeed(this.speed);
        }
-       
+
        public void Rewind (TimeSpan dec) {
                Seek(playbin.CurrentPosition - dec);
        }
-       
+
        public void Forward (TimeSpan inc) {
                Seek(playbin.CurrentPosition + inc);
        }
-       
+
        public void Seek (TimeSpan newPosition) {
                playbin.Seek(newPosition, speed);
        }
-       
+
        public void Seek (double newPosition) {
                playbin.Seek(newPosition, speed); // newPosition in milliseconds
        }
-       
+
        public void Dispose () {
                Close();
                playbin.Dispose();
@@ -177,7 +177,7 @@ public class Player {
 
 
        /* Private members */
-       
+
        private void InitializeSocket () {
                socket = new Socket();
                socket.ModifyBg(StateType.Normal, socket.Style.Black);
@@ -187,25 +187,25 @@ public class Player {
                socket.Realize();
                socket.Show();
        }
-       
+
        private void InitializePlaybin () {
                playbin = new Playbin();
-               
+
                if (!playbin.Initiate(socket.Id))
                        throw new PlayerCouldNotInitiateEngineException();
-               
+
                playbin.Error += OnPlaybinError;
                playbin.EndOfStream += OnPlaybinEndOfStream;
                playbin.StateChanged += OnPlaybinStateChanged;
                playbin.FoundVideoInfo += OnPlaybinFoundVideoInfo;
                playbin.FoundTag += OnPlaybinFoundTag;
        }
-       
+
        private void InitializePositionWatcher () {
                position = new PlayerPositionWatcher(GetPosition);
-               position.Changed += OnPositionWatcherChanged;           
+               position.Changed += OnPositionWatcherChanged;
        }
-       
+
        /// <summary>Gets the current player position.</summary>
        private TimeSpan GetPosition () {
                return playbin.CurrentPosition;
@@ -215,20 +215,20 @@ public class Player {
            playbin.Seek(playbin.CurrentPosition, newSpeed);
        }
 
-               
+
        /* Event members */
-       
+
        private void OnPlaybinError (ErrorEventArgs args) {
                if (Error != null)
                        Error(videoUri, new PlayerEngineException(args.Error, args.Debug));
        }
-       
+
        private void OnPlaybinEndOfStream () {
                position.Stop();
                if (EndOfStream != null)
                        EndOfStream();
        }
-       
+
        private void OnPlaybinStateChanged (StateEventArgs args) {
                if (args.State == MediaStatus.Unloaded)
                        position.Stop();
@@ -238,7 +238,7 @@ public class Player {
                if (StateChanged != null)
                        StateChanged(args);
        }
-       
+
        private void OnPositionWatcherChanged (TimeSpan time) {
                if (PositionChanged != null)
                        PositionChanged(time);
@@ -259,17 +259,17 @@ public class Player {
                if (FoundVideoInfo != null)
                        FoundVideoInfo(args);
        }
-       
+
        private void OnPlaybinFoundTag (TagEventArgs args) {
                if ((!hasFoundDuration) && (FoundDuration != null) && (playbin.Duration != TimeSpan.Zero)) {
                        TimeSpan duration = playbin.Duration;
                        Console.Error.WriteLine("Got video duration: " + duration);
-                       
+
                        hasFoundDuration = true;
                        FoundDuration(duration);
                }
        }
-       
+
 }
 
 }
diff --git a/src/GnomeSubtitles/Ui/VideoPreview/PlayerPositionWatcher.cs 
b/src/GnomeSubtitles/Ui/VideoPreview/PlayerPositionWatcher.cs
index 0909a4e..9139047 100644
--- a/src/GnomeSubtitles/Ui/VideoPreview/PlayerPositionWatcher.cs
+++ b/src/GnomeSubtitles/Ui/VideoPreview/PlayerPositionWatcher.cs
@@ -29,14 +29,14 @@ public delegate void PositionChangedEventHandler (TimeSpan position); //Represen
 
 public class PlayerPositionWatcher {
        private uint timeoutId = 0;
-       
+
        /* Events */
        public event PositionChangedEventHandler Changed;
-       
+
        /* Delegate functions */
        private PlayerGetTimeFunc PlayerGetPosition;
 
-       
+
        /* Constants */
        private const int timeout = 100; //milliseconds
 
@@ -44,28 +44,28 @@ public class PlayerPositionWatcher {
                PlayerGetPosition = playerGetPositionFunc;
        }
 
-       
+
        /* Public methods */
-       
+
        /// <summary>Starts watching for changes on the player position.</summary>
        public void Start () {
                RemoveCheckPositionTimeout();
                AddCheckPositionTimeout();
        }
-       
+
        public void Stop () {
                RemoveCheckPositionTimeout();
        }
-       
+
        /* Event members */
 
        private void RemoveCheckPositionTimeout () {
                if (timeoutId != 0) {
                        GLib.Source.Remove(timeoutId);
                        timeoutId = 0;
-               }       
+               }
        }
-       
+
        private void AddCheckPositionTimeout () {
                timeoutId = GLib.Timeout.Add(timeout, CheckPosition);
        }
@@ -75,7 +75,7 @@ public class PlayerPositionWatcher {
                EmitPositionChanged(position);
                return true;
        }
-               
+
        private void EmitPositionChanged (TimeSpan position) {
                if (Changed != null)
                        Changed(position);
diff --git a/src/GnomeSubtitles/Ui/VideoPreview/SubtitleOverlay.cs 
b/src/GnomeSubtitles/Ui/VideoPreview/SubtitleOverlay.cs
index 51397fe..92b7364 100644
--- a/src/GnomeSubtitles/Ui/VideoPreview/SubtitleOverlay.cs
+++ b/src/GnomeSubtitles/Ui/VideoPreview/SubtitleOverlay.cs
@@ -26,12 +26,12 @@ using System;
 namespace GnomeSubtitles.Ui.VideoPreview {
 
 public class SubtitleOverlay {
-       private Label label = null;     
-       
+       private Label label = null;
+
        /* Current subtitle */
-       private Subtitle subtitle = null;       
+       private Subtitle subtitle = null;
        private bool toShowText = true;
-       
+
        public SubtitleOverlay () {
                EventBox box = Base.GetWidget(WidgetNames.VideoSubtitleLabelEventBox) as EventBox;
                box.ModifyBg(StateType.Normal, box.Style.Black);
@@ -42,9 +42,9 @@ public class SubtitleOverlay {
                Base.InitFinished += OnBaseInitFinished;
        }
 
-       
+
        /* Public properties */
-       
+
        public bool ToShowText {
                get { return toShowText; }
                set { this.toShowText = value; }
@@ -56,32 +56,32 @@ public class SubtitleOverlay {
        public void Close () {
                UnloadSubtitle();
        }
-       
-       
+
+
        /* Private methods */
-       
+
        private void LoadSubtitle (int number) {
-               subtitle = Base.Document.Subtitles[number];             
+               subtitle = Base.Document.Subtitles[number];
                SetText();
                label.Visible = true;
        }
-       
+
        private void UnloadSubtitle () {
-               subtitle = null;                
+               subtitle = null;
                ClearText();
                label.Visible = false;
        }
-       
+
        private void SetText () {
                if (toShowText)
                        SetText(subtitle.Text.Get());
                else
                        SetText(subtitle.Translation.Get());
        }
-       
+
        private void SetText (string text) {
-               string markup = "<span size=\"x-large\""; 
-       
+               string markup = "<span size=\"x-large\"";
+
                if (subtitle.Style.Bold)
                        markup += " weight=\"bold\"";
 
@@ -90,27 +90,27 @@ public class SubtitleOverlay {
 
                if (subtitle.Style.Underline)
                        markup += " underline=\"single\"";
-               
+
                markup += ">" + text + "</span>";
                label.Markup = markup;
        }
-       
+
        private void ClearText () {
                label.Text = String.Empty;
        }
 
 
-       /* Event members */             
+       /* Event members */
 
        private void OnBaseInitFinished () {
-               Base.Ui.Video.Tracker.CurrentSubtitleChanged += OnCurrentSubtitleChanged;               
+               Base.Ui.Video.Tracker.CurrentSubtitleChanged += OnCurrentSubtitleChanged;
        }
 
        private void OnCurrentSubtitleChanged (int indexSubtitle) {
                if (indexSubtitle == -1)
                        UnloadSubtitle();
                else
-                       LoadSubtitle(indexSubtitle);            
+                       LoadSubtitle(indexSubtitle);
        }
 
 }
diff --git a/src/GnomeSubtitles/Ui/VideoPreview/SubtitleTracker.cs 
b/src/GnomeSubtitles/Ui/VideoPreview/SubtitleTracker.cs
index 9c0d3e7..173a7de 100755
--- a/src/GnomeSubtitles/Ui/VideoPreview/SubtitleTracker.cs
+++ b/src/GnomeSubtitles/Ui/VideoPreview/SubtitleTracker.cs
@@ -32,7 +32,7 @@ public class SubtitleTracker {
 
        /* Delegates */
        public delegate void VideoCurrentSubtitleChangedHandler (int indexSubtitle);
-               
+
        /* Events */
        public event VideoCurrentSubtitleChangedHandler CurrentSubtitleChanged;
 
@@ -49,7 +49,7 @@ public class SubtitleTracker {
                else
                        return searchOp.FindNearTime((float)position.TotalSeconds); //TODO write method in 
SubLib that accepts TimeSpans
        }
-               
+
        public void Close(){
                if (IsSubtitleLoaded())
                        UnSetCurrentSubtitle();
@@ -57,26 +57,26 @@ public class SubtitleTracker {
 
 
        /* Private methods */
-       
+
        private bool IsSubtitleLoaded () {
                return this.subtitle != null;
        }
-       
+
        private bool IsTimeInCurrentSubtitle (TimeSpan time) {
                return IsSubtitleLoaded() && (time >= this.subtitle.Times.Start) && (time <= 
this.subtitle.Times.End);
        }
-       
+
        private void SetCurrentSubtitle (int index) {
                if (index != currentSubtitleIndex) {
-                       subtitle = Base.Document.Subtitles[index];      
-                       currentSubtitleIndex = index;                   
+                       subtitle = Base.Document.Subtitles[index];
+                       currentSubtitleIndex = index;
                }
        }
-       
+
        private void UnSetCurrentSubtitle () {
                if (currentSubtitleIndex != -1) {
-                       currentSubtitleIndex = -1;                              
-                       subtitle = null;                        
+                       currentSubtitleIndex = -1;
+                       subtitle = null;
                }
        }
 
@@ -87,12 +87,12 @@ public class SubtitleTracker {
 
 
        /* Event members */
-       
+
        private void OnBaseInitFinished () {
-               Base.Ui.Video.Position.Changed += OnVideoPositionChanged;               
+               Base.Ui.Video.Position.Changed += OnVideoPositionChanged;
                Base.DocumentLoaded += OnBaseDocumentLoaded;
        }
-       
+
        private void OnBaseDocumentLoaded (Document document) {
                this.searchOp = new SearchOperator(document.Subtitles);
        }
@@ -100,18 +100,18 @@ public class SubtitleTracker {
        private void OnVideoPositionChanged (TimeSpan newPosition) {
                if (!(Base.IsDocumentLoaded))
                        return;
-       
+
                if (!(IsTimeInCurrentSubtitle(newPosition))) {
                        int foundSubtitle = searchOp.FindWithTime((float)newPosition.TotalSeconds); //TODO 
write method in SubLib that accepts TimeSpans
                        if (foundSubtitle == -1)
-                               UnSetCurrentSubtitle();                 
+                               UnSetCurrentSubtitle();
                        else
                                SetCurrentSubtitle(foundSubtitle);
-                       
+
                        EmitCurrentSubtitleChanged(currentSubtitleIndex);
                }
-       }               
+       }
 
        }
-       
+
 }
diff --git a/src/GnomeSubtitles/Ui/VideoPreview/Video.cs b/src/GnomeSubtitles/Ui/VideoPreview/Video.cs
index 2404888..5d8f3f8 100644
--- a/src/GnomeSubtitles/Ui/VideoPreview/Video.cs
+++ b/src/GnomeSubtitles/Ui/VideoPreview/Video.cs
@@ -32,12 +32,12 @@ namespace GnomeSubtitles.Ui.VideoPreview {
 public class Video {
        private HBox videoArea = null;
        private AspectFrame frame = null;
-       
+
        private Player player = null;
        private VideoPosition position = null;
        private SubtitleOverlay overlay = null;
        private SubtitleTracker tracker = null;
-       
+
        private bool isLoaded = false;
        private bool playPauseToggleIsSilent = false; //Used to indicate whether toggling the button should 
not issue the toggled signal
 
@@ -48,10 +48,10 @@ public class Video {
 
        public Video () {
                videoArea = Base.GetWidget(WidgetNames.VideoAreaHBox) as HBox;
-               
+
                InitializeVideoFrame();
                InitializePlayer();
-               
+
                position = new VideoPosition(player);
                overlay = new SubtitleOverlay();
                tracker = new SubtitleTracker();
@@ -59,29 +59,29 @@ public class Video {
                SetCustomIcons();
                Base.InitFinished += OnBaseInitFinished;
        }
-       
+
        /* Public properties */
-       
+
        public VideoPosition Position {
                get { return position; }
        }
-       
+
        public SubtitleOverlay Overlay {
                get { return overlay; }
        }
-               
+
        public SubtitleTracker Tracker {
                get { return tracker; }
        }
-       
+
        public bool IsLoaded {
                get { return isLoaded; }
        }
-       
+
        public bool IsStatePlaying {
                get { return player.State == MediaStatus.Playing; }
        }
-       
+
        public float FrameRate {
                get { return player.FrameRate; }
        }
@@ -97,9 +97,9 @@ public class Video {
        public bool HasVideo {
                get { return (player != null) && (player.HasVideo); }
        }
-       
+
        /* Public methods */
-       
+
        public void Show () {
                videoArea.Show();
        }
@@ -107,7 +107,7 @@ public class Video {
        public void Hide () {
                videoArea.Hide();
        }
-       
+
        /// <summary>Opens a video file.</summary>
        /// <exception cref="PlayerCouldNotOpenVideoException">Thrown if the player could not open the 
video.</exception>
        public void Open (Uri videoUri) {
@@ -115,65 +115,65 @@ public class Video {
 
                player.Open(videoUri);
        }
-       
+
        public void Close () {
                if (!isLoaded)
                        return;
-       
+
                isLoaded = false;
 
                player.Close();
                overlay.Close();
                tracker.Close();
                position.Disable();
-               
-               
+
+
                /* Update the frame */
                frame.Child.Hide();
                frame.Child.Show();
                frame.Ratio = Player.DefaultAspectRatio;
-               
+
                SilentDisablePlayPauseButton();
                UpdateSpeedControls(1);
                SetControlsSensitivity(false);
 
                Core.Base.Ui.Menus.RemoveFrameRateVideoTag();
        }
-       
+
        public void Quit () {
                player.Close();
        }
-               
+
        public void SetLoopSelectionPlayback (bool enabled){
                if (enabled)
                        Base.Ui.Video.Position.Changed += OnVideoPositionChangedLoopPlayback;
                else
                        Base.Ui.Video.Position.Changed -= OnVideoPositionChangedLoopPlayback;
        }
-       
+
        public void Rewind () {
                player.Rewind(position.SeekIncrement);
        }
-       
+
        public void Forward () {
                player.Forward(position.SeekIncrement);
        }
-       
+
        public void SpeedUp () {
            player.SpeedUp();
            UpdateSpeedControls(player.Speed);
        }
-       
+
        public void SpeedDown () {
            player.SpeedDown();
            UpdateSpeedControls(player.Speed);
        }
-       
+
        public void SpeedReset () {
            player.SpeedReset();
            UpdateSpeedControls(player.Speed);
        }
-       
+
        /// <summary>Seeks to the specified time.</summary>
        /// <param name="time">The time position to seek to, in seconds.</param>
        public void Seek (TimeSpan time) {
@@ -182,7 +182,7 @@ public class Video {
 
                player.Seek(time);
        }
-       
+
        public void Seek (int frames) {
                if (!isLoaded)
                        return;
@@ -197,11 +197,11 @@ public class Video {
                        Seek(subtitle.Times.Start);
                }
        }
-       
+
        public void SeekToSelection () {
                SeekToSelection(false);
        }
-       
+
        public void SeekToSelection (bool allowRewind) {
                Subtitle subtitle = Core.Base.Ui.View.Selection.FirstSubtitle;
        TimeSpan time = subtitle.Times.Start;
@@ -211,25 +211,25 @@ public class Video {
        }
        Seek(time);
        }
-       
-       public void SelectNearestSubtitle () {          
+
+       public void SelectNearestSubtitle () {
                int indexToSelect = tracker.FindSubtitleNearPosition(position.CurrentTime);
                Base.Ui.View.Selection.Select(indexToSelect, true, true);
        }
-       
+
        /* Private methods */
 
        private void Play () {
                player.Play();
        }
-       
+
        private void Pause () {
                player.Pause();
        }
-       
+
        private void UpdateSpeedControls (float speed) {
                (Base.GetWidget(WidgetNames.VideoSpeedButton) as Button).Label = String.Format("{0:0.0}x", 
speed);
-               
+
                Base.GetWidget(WidgetNames.VideoSpeedDownButton).Sensitive = (speed > Player.DefaultMinSpeed);
                Base.GetWidget(WidgetNames.VideoSpeedUpButton).Sensitive = (speed < Player.DefaultMaxSpeed);
        }
@@ -237,39 +237,39 @@ public class Video {
        private void SetCustomIcons () {
                /* Set the icon for the SetSubtitleStart button */
                Gdk.Pixbuf pixbuf = new Gdk.Pixbuf(null, videoSetSubtitleStartIconFilename);
-               Image image = Base.GetWidget(WidgetNames.VideoSetSubtitleStartButtonImage) as Image;    
+               Image image = Base.GetWidget(WidgetNames.VideoSetSubtitleStartButtonImage) as Image;
                image.Pixbuf = pixbuf;
 
                /* Set the icon for the SetSubtitleEnd button */
                pixbuf = new Gdk.Pixbuf(null, videoSetSubtitleEndIconFilename);
                image = Base.GetWidget(WidgetNames.VideoSetSubtitleEndButtonImage) as Image;
                image.Pixbuf = pixbuf;
-                       
+
                /* Set the icon for the SetSubtitleStartEnd button */
                pixbuf = new Gdk.Pixbuf(null, videoSetSubtitleStartEndIconFilename);
                image = Base.GetWidget(WidgetNames.VideoSetSubtitleStartEndButtonImage) as Image;
                image.Pixbuf = pixbuf;
        }
-       
+
        private void InitializeVideoFrame () {
                /* Create frame */
                frame = new AspectFrame(null, 0.5f, 0.5f, 1.6f, false);
                frame.Shadow = ShadowType.None;
-               
+
                /* Create event box */
                EventBox videoFrameEventBox = new EventBox();
                videoFrameEventBox.Add(frame);
                videoFrameEventBox.ModifyBg(StateType.Normal, videoFrameEventBox.Style.Black);
-       
+
                /* Attach event box */
                Table videoImageTable = Base.GetWidget("videoImageTable") as Table;
                videoImageTable.Attach(videoFrameEventBox, 0, 1, 0, 1);
                videoImageTable.ShowAll();
        }
-       
+
        private void InitializePlayer () {
                player = new Player(frame);
-               
+
                player.FoundVideoInfo += OnPlayerFoundVideoInfo;
                player.StateChanged += OnPlayerStateChanged;
                player.FoundDuration += OnPlayerFoundDuration;
@@ -280,25 +280,25 @@ public class Video {
        private void SetControlsSensitivity (bool sensitivity) {
                Base.GetWidget(WidgetNames.VideoTimingsVBox).Sensitive = sensitivity;
                Base.GetWidget(WidgetNames.VideoPlaybackHBox).Sensitive = sensitivity;
-               
+
                if ((Core.Base.Ui.View.Selection.Count == 1) && sensitivity)
                        SetSelectionDependentControlsSensitivity(true);
                else
                        SetSelectionDependentControlsSensitivity(false);
        }
-       
+
        private void SetSelectionDependentControlsSensitivity (bool sensitivity) {
                Base.GetWidget(WidgetNames.VideoSetSubtitleStartButton).Sensitive = sensitivity;
                Base.GetWidget(WidgetNames.VideoSetSubtitleEndButton).Sensitive = sensitivity;
                Base.GetWidget(WidgetNames.VideoSetSubtitleStartEndButton).Sensitive = sensitivity;
        }
-       
+
        private void SilentDisablePlayPauseButton () {
                ToggleButton button = Base.GetWidget(WidgetNames.VideoPlayPauseButton) as ToggleButton;
                if (button.Active) {
                        playPauseToggleIsSilent = true;
                        button.Active = false;
-               }               
+               }
        }
 
        private void handlePlayerLoading () {
@@ -313,16 +313,16 @@ public class Video {
        private bool isPlayerLoadComplete () {
                return (player != null) && (player.State != MediaStatus.Unloaded) && (player.HasVideoInfo) && 
(player.HasDuration);
        }
-       
+
        /* Event members */
-       
+
        private void OnBaseInitFinished () {
                ToggleButton button = Base.GetWidget(WidgetNames.VideoPlayPauseButton) as ToggleButton;
                button.Toggled += OnPlayPauseButtonToggled;
-               
-               Base.Ui.View.Selection.Changed += OnSubtitleSelectionChanged;           
+
+               Base.Ui.View.Selection.Changed += OnSubtitleSelectionChanged;
        }
-       
+
        private void OnPlayPauseButtonToggled (object o, EventArgs args) {
                if (playPauseToggleIsSilent) {
                        playPauseToggleIsSilent = false;
@@ -334,11 +334,11 @@ public class Video {
                else
                        Pause();
        }
-       
+
        private void OnPlayerFoundVideoInfo (VideoInfoEventArgs args) {
                handlePlayerLoading();
        }
-       
+
        private void OnPlayerStateChanged (StateEventArgs args) {
                if (args.State == MediaStatus.Loaded) {
                        handlePlayerLoading();
@@ -348,12 +348,12 @@ public class Video {
        private void OnPlayerFoundDuration (TimeSpan duration) {
                handlePlayerLoading();
        }
-       
+
        private void OnPlayerEndOfStream () {
                ToggleButton playPauseButton = Base.GetWidget(WidgetNames.VideoPlayPauseButton) as 
ToggleButton;
                playPauseButton.Active = false;
        }
-       
+
        private void OnPlayerError (Uri videoUri, Exception e) {
                Close();
                VideoErrorDialog dialog = new VideoErrorDialog(videoUri, e);
@@ -364,11 +364,11 @@ public class Video {
 
        private void OnSubtitleSelectionChanged (TreePath[] paths, Subtitle subtitle) {
                if ((subtitle != null) && IsLoaded)
-                       SetSelectionDependentControlsSensitivity(true);                 
+                       SetSelectionDependentControlsSensitivity(true);
                else
                        SetSelectionDependentControlsSensitivity(false);
        }
-       
+
        /// <summary>Do loop playback when it's enabled, seeking to current selection on video position 
change.</summary>
        private void OnVideoPositionChangedLoopPlayback (TimeSpan position) {
                if (!(Base.IsDocumentLoaded))
diff --git a/src/GnomeSubtitles/Ui/VideoPreview/VideoFiles.cs 
b/src/GnomeSubtitles/Ui/VideoPreview/VideoFiles.cs
index 7c765fc..1a3b50c 100644
--- a/src/GnomeSubtitles/Ui/VideoPreview/VideoFiles.cs
+++ b/src/GnomeSubtitles/Ui/VideoPreview/VideoFiles.cs
@@ -31,22 +31,22 @@ public class VideoFiles {
 
        public static ArrayList GetVideoFilesAtPath (string path) {
                ArrayList videoFiles = new ArrayList();
-       
+
                if ((path == null) || (path == String.Empty))
                        return videoFiles;
 
                string[] allFiles = Directory.GetFiles(path, "*.*");
                foreach (string file in allFiles) {
                        if (videoFilesRegex.IsMatch(file))
-                               videoFiles.Add(file);   
-               }               
+                               videoFiles.Add(file);
+               }
                return videoFiles;
        }
-       
+
        public static Uri FindMatchingVideo (string file) {
                ArrayList videoFiles = GetVideoFilesAtPath(Path.GetDirectoryName(file));
                string filename = Path.GetFileNameWithoutExtension(file);
-               
+
                foreach (string videoFile in videoFiles) {
                        string video = Path.GetFileNameWithoutExtension(videoFile);
                        if (video == filename)
diff --git a/src/GnomeSubtitles/Ui/VideoPreview/VideoPosition.cs 
b/src/GnomeSubtitles/Ui/VideoPreview/VideoPosition.cs
index b2d80c8..def0a30 100644
--- a/src/GnomeSubtitles/Ui/VideoPreview/VideoPosition.cs
+++ b/src/GnomeSubtitles/Ui/VideoPreview/VideoPosition.cs
@@ -32,9 +32,9 @@ public class VideoPosition {
        private Player player = null;
        private Label positionLabel = null;
        private Label positionValueLabel = null;
-       private Label lengthValueLabel = null;  
+       private Label lengthValueLabel = null;
        private TimeSpan position = TimeSpan.Zero;
-       
+
        /* Slider related */
        private HScale slider = null;
        private uint userUpdateTimeoutId = 0; //the ID of the timeout after which the value will be updated 
by the user selection
@@ -66,40 +66,40 @@ public class VideoPosition {
        public TimeSpan SeekIncrement {
                get { return seekIncrement; }
        }
-       
+
        /// <summary>The current position, in seconds.</summary>
        public TimeSpan CurrentTime {
                get { return position; }
        }
-       
+
        public int CurrentFrames {
                get { return Convert.ToInt32(TimingUtil.TimeToFrames(position, player.FrameRate)); }
        }
-       
+
        public TimeSpan Duration {
                get { return player.Duration; }
        }
-       
+
        public int DurationInFrames {
                get { return Convert.ToInt32(TimingUtil.TimeToFrames(player.Duration, player.FrameRate)); }
        }
-       
+
        /* Public methods */
-       
+
        public void Disable () {
                DisconnectSliderSignals();
                RemoveUserUpdateTimeout();
-               
+
                position = TimeSpan.Zero;
                UpdatePositionValues(TimeSpan.Zero);
                SetLength(TimeSpan.Zero);
-               
-               slider.Sensitive = false;       
+
+               slider.Sensitive = false;
        }
 
 
        /* Event members */
-       
+
        private void OnSliderValueChanged (object o, EventArgs args) {
                if (isPlayerUpdate) {
                        isPlayerUpdate = false;
@@ -108,11 +108,11 @@ public class VideoPosition {
                RemoveUserUpdateTimeout();
                AddUserUpdateTimeout();
        }
-       
+
        /// <summary>Handles changes in the player position.</summary>
        private void OnPlayerPositionChanged (TimeSpan newPosition) {
                position = newPosition;
-       
+
                if (userUpdateTimeoutId == 0)  //There is not a manual positioning going on
                        UpdateSlider(newPosition);
 
@@ -125,44 +125,44 @@ public class VideoPosition {
                slider.Sensitive = true;
                ConnectSliderSignals();
        }
-       
+
        private bool UpdatePlayerPosition () {
                userUpdateTimeoutId = 0;
                player.Seek(slider.Value);
                return false;
        }
-       
+
        private void RemoveUserUpdateTimeout () {
                if (userUpdateTimeoutId != 0) {
                        GLib.Source.Remove(userUpdateTimeoutId);
                        userUpdateTimeoutId = 0;
                }
        }
-       
+
        private void AddUserUpdateTimeout () {
                userUpdateTimeoutId = GLib.Timeout.Add(userUpdateTimeout, UpdatePlayerPosition);
        }
-       
+
        private void EmitVideoPositionChanged (TimeSpan newPosition) {
                if (Changed != null)
                        Changed(newPosition);
        }
-       
+
        private void ConnectSliderSignals () {
                slider.ValueChanged += OnSliderValueChanged;
        }
-       
+
        private void DisconnectSliderSignals () {
                slider.ValueChanged -= OnSliderValueChanged;
        }
-       
+
        private void OnBaseInitFinished () {
-               Base.TimingModeChanged += OnBaseTimingModeChanged;              
+               Base.TimingModeChanged += OnBaseTimingModeChanged;
                Base.VideoLoaded += OnBaseVideoLoaded;
 
                player.PositionChanged += OnPlayerPositionChanged;
        }
-       
+
        private void OnBaseTimingModeChanged (TimingMode timingMode) {
                UpdatePositionLabel(timingMode);
                UpdatePositionValueLabel(position);
@@ -171,12 +171,12 @@ public class VideoPosition {
        }
 
        /* Private members */
-       
+
        private void UpdatePositionValues (TimeSpan newPosition) {
                UpdateSlider(newPosition);
                UpdatePositionValueLabel(newPosition);
        }
-       
+
        private void UpdateSlider (TimeSpan newPosition) {
                isPlayerUpdate = true;
                slider.Value = newPosition.TotalMilliseconds;
@@ -193,14 +193,14 @@ public class VideoPosition {
 
        private void UpdatePositionLabel (TimingMode timingMode) {
                string mode = (timingMode == TimingMode.Times ? Catalog.GetString("Time") : 
Catalog.GetString("Frame"));
-               positionLabel.Markup = "<b>" + mode + "</b>"; 
+               positionLabel.Markup = "<b>" + mode + "</b>";
        }
-       
+
        private void SetLength (TimeSpan length) {
                SetSliderLength(length);
                UpdateLengthLabel(Base.TimingMode, length);
        }
-       
+
        private void UpdateLengthLabel (TimingMode timingMode, TimeSpan length) {
                if (timingMode == TimingMode.Times)
                        lengthValueLabel.Text = Util.TimeSpanToText(length);
@@ -209,7 +209,7 @@ public class VideoPosition {
                        lengthValueLabel.Text = Convert.ToInt32(frames).ToString();
                }
        }
-       
+
        private void SetSliderLength (TimeSpan length) {
                slider.Adjustment.Upper = length.TotalMilliseconds;
        }
diff --git a/src/GnomeSubtitles/Ui/View/CellRendererCenteredText.cs 
b/src/GnomeSubtitles/Ui/View/CellRendererCenteredText.cs
index a287a10..a01b928 100644
--- a/src/GnomeSubtitles/Ui/View/CellRendererCenteredText.cs
+++ b/src/GnomeSubtitles/Ui/View/CellRendererCenteredText.cs
@@ -27,7 +27,7 @@ namespace GnomeSubtitles.Ui.View {
 public class CellRendererCenteredText2 : CellRendererText {
 
        public CellRendererCenteredText2 () : base() {
-               //this.Alignment = Pango.Alignment.Center;      
+               //this.Alignment = Pango.Alignment.Center;
        }
 
        /*protected override void Render (Drawable window, Widget widget, Rectangle backgroundArea,
@@ -45,7 +45,7 @@ public class CellRendererCenteredText2 : CellRendererText {
                        state = StateType.Prelight;
                else
                        state = (widget.State == StateType.Insensitive ? StateType.Insensitive : 
StateType.Normal);
-               
+
                Pango.Layout layout = widget.CreatePangoLayout(null);
                layout.Alignment = Pango.Alignment.Center;
                Pango.FontDescription fontDescription = new Pango.FontDescription();
@@ -60,7 +60,7 @@ public class CellRendererCenteredText2 : CellRendererText {
 
                Gtk.Style.PaintLayout(widget.Style, window, state, true, cellArea, widget,
                        "cellrenderertext", cellArea.X + xOffset, cellArea.Y + yOffset, layout);
-                       
+
        }*/
 
 }
diff --git a/src/GnomeSubtitles/Ui/View/SelectionIntended.cs b/src/GnomeSubtitles/Ui/View/SelectionIntended.cs
index d873dd8..1bd2b66 100644
--- a/src/GnomeSubtitles/Ui/View/SelectionIntended.cs
+++ b/src/GnomeSubtitles/Ui/View/SelectionIntended.cs
@@ -26,16 +26,16 @@ public enum SelectionIntended {
 
        /// <summary>Use the current selection.</summary>
        Simple,
-       
+
        /// <summary>Use the current selection to the first subtitle.</summary>
        SimpleToFirst,
-       
+
        /// <summary>Use the current selection to the last subtitle.</summary>
        SimpleToLast,
-       
+
        /// <summary>A range of subtitles is selected.</summary>
        Range,
-       
+
        /// <summary>All subtitles are selected.</summary>
        All
 }
diff --git a/src/GnomeSubtitles/Ui/View/SelectionType.cs b/src/GnomeSubtitles/Ui/View/SelectionType.cs
index e8a6d8a..8a9ebe7 100644
--- a/src/GnomeSubtitles/Ui/View/SelectionType.cs
+++ b/src/GnomeSubtitles/Ui/View/SelectionType.cs
@@ -26,10 +26,10 @@ public enum SelectionType {
 
        /// <summary>A set of subtitles is selected.</summary>
        Simple,
-       
+
        /// <summary>A range of subtitles are selected.</summary>
        Range,
-       
+
        /// <summary>All subtitles are selected.</summary>
        All
 }
diff --git a/src/GnomeSubtitles/Ui/View/SubtitleSelection.cs b/src/GnomeSubtitles/Ui/View/SubtitleSelection.cs
index 2b20bdd..bf7f97c 100644
--- a/src/GnomeSubtitles/Ui/View/SubtitleSelection.cs
+++ b/src/GnomeSubtitles/Ui/View/SubtitleSelection.cs
@@ -43,29 +43,29 @@ public class SubtitleSelection {
                Base.InitFinished += OnBaseInitFinished;
        }
 
-       
+
        /* Events */
-       
+
        public SubtitleSelectionChangedHandler Changed;
 
        /* Public properties */
-    
+
     /// <summary>An array containing the selected paths.</summary>
     public TreePath[] Paths {
        get { return selection.GetSelectedRows(); }
     }
-    
+
     /// <summary>The first selected path, or null if no path is selected.</summary>
     public TreePath FirstPath {
        get {
                TreePath[] paths = Paths;
                if (paths.Length == 0)
                        return null;
-               else 
+               else
                        return paths[0];
        }
     }
-    
+
     /// <summary>The last selected path, or null if no path is selected.</summary>
     public TreePath LastPath {
        get {
@@ -77,7 +77,7 @@ public class SubtitleSelection {
                        return paths[pathCount - 1];
        }
     }
-    
+
     /// <summary>The selected path.</summary>
     /// <remarks>If there is more than one path selected, null is returned.</remarks>
        public TreePath Path {
@@ -93,7 +93,7 @@ public class SubtitleSelection {
        /// <summary>The range of selected subtitles, an array with 2 positions containing the first and last 
paths of the selection.</summary>
        /// <remarks>If only 1 subtitle is selected, the range will start and end on that subtitle. If the 
selection is empty, null is returned.</remarks>
        public TreePath[] Range {
-               get { 
+               get {
                        TreePath[] paths = Paths;
                if (paths.Length == 0)
                        return null;
@@ -105,41 +105,41 @@ public class SubtitleSelection {
                }
        }
        }
-       
+
        /// <summary>The range of paths, starting at the first path (even if not selected), and ending at the 
last selected path.</summary>
        public TreePath[] PathsToFirst {
                get {
                        TreePath lastPath = LastPath;
                        if (lastPath == null)
                                return null;
-                       
+
                        TreePath[] range = new TreePath[2];
                range[0] = TreePath.NewFirst();
                range[1] = lastPath;
                return range;
                }
        }
-       
+
        /// <summary>The range of paths, starting at the first selected path, and ending at the last path 
(even if not selected).</summary>
        public TreePath[] PathsToLast {
                get {
                        TreePath firstPath = FirstPath;
                        if (firstPath == null)
                                return null;
-                       
+
                        TreePath[] range = new TreePath[2];
                range[0] = firstPath;
-               
+
                int count = Base.Document.Subtitles.Count;
                range[1] = Util.IntToPath(count - 1);
                return range;
                }
        }
-    
+
     public Subtitle Subtitle {
        get { return subtitle; }
     }
-    
+
     /// <summary>The selected subtitle. If there is more than one selected, the first is returned.</summary>
     public Subtitle FirstSubtitle {
        get {
@@ -150,7 +150,7 @@ public class SubtitleSelection {
                        return null;
        }
     }
-               
+
        /// <summary>The last selected subtitle. If there is only one selected, the first is 
returned.</summary>
     public Subtitle LastSubtitle {
        get {
@@ -166,7 +166,7 @@ public class SubtitleSelection {
     public int Count {
        get { return selection.CountSelectedRows(); }
     }
-    
+
     /// <summary>The selected path that currently has the focus.<summary>
     /// <remarks>If none of the selected paths have focus, the <see cref="FirstPath" /> is returned. The 
first path,
     /// on the other hand, can be null if no path is selected. If there isn't a focused row, null is 
returned.</remarks>
@@ -181,11 +181,11 @@ public class SubtitleSelection {
                        if (selection.PathIsSelected(path))
                                return path;
                        else
-                       return FirstPath;       
+                       return FirstPath;
        }
-    
+
     }
-    
+
     /* Public methods */
 
        /// <summary>Selects the specified paths and possibly gives focus to the specified path.</summary>
@@ -220,7 +220,7 @@ public class SubtitleSelection {
                        return true;
                }
        }
-    
+
     /// <summary>Selects the specified path, possibly aligning it to the center and/or reselecting 
it.</summary>
     /// <param name="path">The path to select. If it's null, all paths will be unselected.</param>
     /// <param name="align">Whether to align the selected path to the center if the path isn't visible and 
scrolling is needed.</param>
@@ -233,17 +233,17 @@ public class SubtitleSelection {
                        UnselectAll();
                        return;
                }
-               
+
                if ((!reselect) && (checkAllPaths || (Count == 1)) && (selection.PathIsSelected(path))) //No 
reselection is required and path is already the only selected path
                        return;
 
                SetFocus(path, align);
        }
-       
+
        public void Select (TreePath path, bool align, bool reselect) {
                Select(path, align, reselect, false);
        }
-       
+
        /// <summary>Selects the specified index, possibly aligning it to the center and/or reselecting 
it.</summary>
        /// <param name="index">The index of the subtitle to select.</param>
     /// <param name="align">Whether to align the selected path to the center if the path isn't visible and 
scrolling is needed.</param>
@@ -253,11 +253,11 @@ public class SubtitleSelection {
        if ((index >= 0) && (index < Base.Document.Subtitles.Count))
                Select(Util.IntToPath(index), align, reselect, checkAllPaths);
        }
-       
+
        public void Select (int index, bool align, bool reselect) {
                Select(index, align, reselect, false);
        }
-       
+
        /// <summary>Selects a <see cref="TreePath" />, activates it and selects text in the subtitle it 
refers to.</summary>
        /// <param name="path">The path to select. If it's null, all paths will be unselected.</param>
     /// <param name="align">Whether to align the selected path to the center if the path isn't visible and 
scrolling is needed.</param>
@@ -268,19 +268,19 @@ public class SubtitleSelection {
        public void Select (TreePath path, bool align, bool reselect, int start, int end, SubtitleTextType 
textType) {
                if (path == null) {
                        UnselectAll();
-                       return;         
+                       return;
                }
                Select(path, align, reselect);
-               Core.Base.Ui.Edit.TextFocusOnSelection(start, end, textType);           
+               Core.Base.Ui.Edit.TextFocusOnSelection(start, end, textType);
        }
-               
+
     /// <summary>Selects the first subtitle.</summary>
     /// <remarks>The subtitle is only selected if it exists.</remarks>
     public void SelectFirst () {
        if (Base.Document.Subtitles.Count > 0)
                Select(TreePath.NewFirst(), false, false);
     }
-    
+
     /// <summary>Selects the last subtitle.</summary>
     /// <remarks>The subtitle is only selected if it exists.</remarks>
     public void SelectLast () {
@@ -288,22 +288,22 @@ public class SubtitleSelection {
        if (count > 0)
                Select(Util.IntToPath(count - 1), false, false);
     }
-    
+
     /// <summary>Selects the next path. If multiple paths are currently selected, the one after the
     /// last selected path is selected. If no paths are selected, the first one is selected.</summary>
     public void SelectNext () {
        if (Count == 0) {
                SelectFirst();
                return;
-       }    
+       }
        TreePath path = LastPath;
        if (path.Indices[0] == (Base.Document.Subtitles.Count - 1)) //this is the last existing path
                return;
-       
+
        TreePath next = Util.PathNext(path);
        Select(next, false, true);
     }
-    
+
     /// <summary>Selects the previous path. If multiple paths are currently selected, the one before the
     /// first selected path is selected. If no paths are selected, the first one is selected.</summary>
     public void SelectPrevious () {
@@ -314,7 +314,7 @@ public class SubtitleSelection {
        TreePath path = FirstPath;
        if (path.Indices[0] == 0) //this is the first existing path
                return;
-       
+
        TreePath previous = Util.PathPrevious(path);
        Select(previous, false, true);
     }
@@ -323,7 +323,7 @@ public class SubtitleSelection {
        public void SelectAll () {
                selection.SelectAll();
        }
-       
+
        /// <summary>Needed for the selection-dependent widgets to refresh when the contents of a selection 
are changed
        /// while the selection itself isn't. Example: applying styles to a single selected subtitle</summary>
     public void Reselect () {
@@ -335,20 +335,20 @@ public class SubtitleSelection {
     /// <param name="focus ">The path corresponding to the input focus.</param>
     /// <param name="toAlign">Whether to align the path to the center.</param>
        public void ScrollToFocus (TreePath focus, bool align) {
-               Scroll(focus, align);   
+               Scroll(focus, align);
        }
-       
+
        /* Private members */
 
        /// <summary>Selects the specified paths according to the specified <see cref="SelectionType" />
        /// and possibly gives focus to the specified path.</summary>
-       /// <param name="paths">The paths to select. If <see cref="SelectionType" /> is Range this must be an 
array 
+       /// <param name="paths">The paths to select. If <see cref="SelectionType" /> is Range this must be an 
array
        /// with length 2 containing the first and last paths in the range. This value must be validated 
before calling this method.</param>
        /// <param name="focus">The path to give input focus to. It must be one of the specified paths or 
null, in which case no focus will be given.</param>
        /// <param name="align">Whether to align the focused path to the center if the path isn't visible and 
scrolling is needed.</param>
        private void Select (TreePath[] paths, SelectionType selectionType, TreePath focus, bool align) {
                DisconnectSelectionChangedSignal();
-               
+
                if (focus != null)
                        SetFocus(focus, align);
                else
@@ -361,11 +361,11 @@ public class SubtitleSelection {
                else if (selectionType == SelectionType.Range) {
                        selection.SelectRange(paths[0], paths[1]);
                }
-               
-               ConnectSelectionChangedSignal();                
+
+               ConnectSelectionChangedSignal();
                OnSelectionChanged(this, EventArgs.Empty); //Need to simulate this event because the signal 
was disabled during selection change
        }
-               
+
        /// <summary>Sets the input to the specified path and selects it, possibly aligning it to the 
center.</summary>
        /// <param name="path">The path to place the cursor at.</param>
        /// <param name="align">Whether to align the path to the center if it isn't visible.</param>
@@ -374,19 +374,19 @@ public class SubtitleSelection {
                ScrollToFocus(path, align);
                tree.SetCursor(path, null, false);
        }
-       
+
        /// <summary>Unselects all subtitles.</summary>
        private void UnselectAll () {
                selection.UnselectAll();
        }
-       
+
        /// <summary>Scrolls to the specified path and optionally aligns it to the center of the <see 
cref="TreeView" />.</summary>
     /// <param name="path">The path to scroll to.</param>
     /// <param name="toAlign">Whether to align the path to the center.</param>
        private void ScrollToCell (TreePath path, bool align) {
                tree.ScrollToCell(path, null, align, 0.5f, 0.5f);
        }
-       
+
        /// <summary>Scrolls to the specified path, in case it isn't currently visible, centering the row on 
the center of the <see cref="TreeView" /></summary>
     private void Scroll (TreePath path, bool align) {
        TreePath startPath, endPath;
@@ -410,9 +410,9 @@ public class SubtitleSelection {
                Select(path, align, reselect);
                tree.ActivateRow(path, null);
        }
-    
+
        /* Event members */
-       
+
        private void OnBaseInitFinished () {
                ConnectSelectionChangedSignal();
        }
@@ -420,21 +420,21 @@ public class SubtitleSelection {
        private void ConnectSelectionChangedSignal () {
                selection.Changed += OnSelectionChanged;
        }
-       
+
        private void DisconnectSelectionChangedSignal () {
                selection.Changed -= OnSelectionChanged;
        }
-       
+
        private void OnSelectionChanged (object o, EventArgs args) {
                subtitle = (this.Count == 1 ? Base.Document.Subtitles[Path] : null);
                EmitChangedEvent();
        }
-       
+
        private void EmitChangedEvent () {
                if (Changed != null)
                        Changed(Paths, subtitle);
        }
-    
+
 }
 
 }
diff --git a/src/GnomeSubtitles/Ui/View/SubtitleView.cs b/src/GnomeSubtitles/Ui/View/SubtitleView.cs
index 6d4b296..d69c5c0 100644
--- a/src/GnomeSubtitles/Ui/View/SubtitleView.cs
+++ b/src/GnomeSubtitles/Ui/View/SubtitleView.cs
@@ -35,7 +35,7 @@ public class SubtitleView {
        private TreeView tree = null;
        private SubtitleSelection selection = null;
        private Search search = null;
-       
+
        private TreeViewColumn numberCol = null;
        private TreeViewColumn startCol = null;
        private TreeViewColumn endCol = null;
@@ -43,7 +43,7 @@ public class SubtitleView {
        private TreeViewColumn textCol = null;
        private TreeViewColumn translationCol = null;
 
-       
+
        public SubtitleView() {
                tree = Base.GetWidget(WidgetNames.SubtitleView) as TreeView;
                selection = new SubtitleSelection(tree);
@@ -51,12 +51,12 @@ public class SubtitleView {
 
                CreateColumns();
                SetEmptyModel();
-               
+
                Base.InitFinished += OnBaseInitFinished;
     }
-    
+
        /* Events */
-       
+
        public event SubtitleCountChangedHandler SubtitleCountChanged;
 
        /* Public properties */
@@ -64,13 +64,13 @@ public class SubtitleView {
     public SubtitleSelection Selection {
        get { return selection; }
     }
-    
+
     public Search Search {
        get { return search; }
     }
-    
-    /* Public methods */ 
-       
+
+    /* Public methods */
+
        public void SetAutoSelectSubtitles (bool active) {
                if (active)
                        Base.Ui.Video.Tracker.CurrentSubtitleChanged += OnCurrentSubtitleChanged;
@@ -78,13 +78,13 @@ public class SubtitleView {
                        Base.Ui.Video.Tracker.CurrentSubtitleChanged -= OnCurrentSubtitleChanged;
        }
 
-       
+
        /// <summary>Instructs the <see cref="TreeView" /> to redraw a row.</summary>
        /// <remarks>This is useful when a row changes its width, for instance.</remarks>
        public void RedrawPath (TreePath path) {
                subtitles.Model.EmitRowChanged(path, TreeIter.Zero);
        }
-       
+
        public void RedrawPaths (TreePath[] paths) {
                foreach (TreePath path in paths)
                        RedrawPath(path);
@@ -95,7 +95,7 @@ public class SubtitleView {
     public void Refresh () {
            tree.QueueDraw();
     }
-       
+
        /// <summary>Inserts a new subtitle after the specified <see cref="TreePath" />.</summary>
        /// <param name="path">The path after which the new subtitle will be inserted.</param>
        /// <remarks>The new subtitle's timings are based on the subtitle at the specified path.</remarks>
@@ -104,13 +104,13 @@ public class SubtitleView {
                int index = Util.PathToInt(path);
                if (!subtitles.Collection.Contains(index)) //The index isn't valid
                        return false;
-       
+
                subtitles.AddNewAfter(index);
                TreePath newPath = Util.PathNext(path);
                selection.Select(newPath, true, true);
                return true;
        }
-       
+
        /// <summary>Inserts a new subtitle before the specified <see cref="TreePath" />.</summary>
        /// <param name="path">The path before which the new subtitle will be inserted.</param>
        /// <remarks>The new subtitle's timings are based on the subtitle at the specified path.</remarks>
@@ -119,7 +119,7 @@ public class SubtitleView {
                int index = Util.PathToInt(path);
                if (!subtitles.Collection.Contains(index)) //The index isn't valid
                        return false;
-       
+
                subtitles.AddNewBefore(index);
                selection.Select(path, true, true); //The path now points to the new subtitle
                return true;
@@ -132,12 +132,12 @@ public class SubtitleView {
                int index = Util.PathToInt(path);
                if (!(subtitles.Collection.Contains(index) || (index == subtitles.Count)))
                        return false;
-               
+
                subtitles.AddNewAt(index);
                selection.Select(path, true, true);
                return true;
        }
-       
+
        /// <summary>Inserts a new subtitle at the specified <see cref="TreePath" />, with the specified 
start time.</summary>
        /// <param name="path">The path at which the new subtitle will be inserted.</param>
        /// <param name="start">The time at which the new subtitle should start.</para>
@@ -151,14 +151,14 @@ public class SubtitleView {
                selection.Select(path, true, true);
                return true;
        }
-       
+
        /// <summary>Inserts a subtitle in the specified path.</summary>
        public void Insert (Subtitle subtitle, TreePath path) {
                int index = Util.PathToInt(path);
                subtitles.Add(subtitle, index);
-               selection.Select(path, true, true);     
+               selection.Select(path, true, true);
        }
-       
+
        /// <summary>Inserts a collection of subtitles in the specified paths.</summary>
        /// <param name="subtitles">The subtitles to insert.</param>
        /// <param name="paths">The paths corresponding to each of the subtitles. There must be the same 
number of paths as there are for subtitles.</param>
@@ -172,17 +172,17 @@ public class SubtitleView {
                }
                selection.Select(paths, focus, true);
        }
-       
+
        public void Insert (Subtitle[] subtitles, TreePath firstPath, TreePath focus) {
                for (int index = 0, pathIndex = Util.PathToInt(firstPath) ; index < subtitles.Length  ; 
index++, pathIndex++) {
                        Subtitle subtitle = subtitles[index];
-                       this.subtitles.Add(subtitle, pathIndex);                
+                       this.subtitles.Add(subtitle, pathIndex);
                }
                TreePath lastPath = Util.IntToPath(Util.PathToInt(firstPath) + subtitles.Length - 1);
                TreePath[] pathRange = new TreePath[]{firstPath, lastPath};
                selection.SelectRange(pathRange, focus, true);
        }
-       
+
        /// <summary>Removes the subtitle at the specified path and selects the next or previous subtitle 
afterwards.</summary>
        /// <param name="path">The path to remove.</param>
        /// <param name="selectNext">Whether to select the next path after deletion, if possible.
@@ -195,17 +195,17 @@ public class SubtitleView {
 
                int indexToSelect = FindNearIndex(index, selectNext);
                if (indexToSelect != -1) {
-                       TreePath pathToSelect = Util.IntToPath(indexToSelect); 
+                       TreePath pathToSelect = Util.IntToPath(indexToSelect);
                        selection.Select(pathToSelect, true, true);
                }
                return true;
        }
-       
+
        /// <summary>Removes the subtitles at the specified paths and selects the next subtitle 
afterwards.</summary>
        /// <param name="paths">The paths to remove.</param>
        /// <returns>Whether removal succeeded.</returns>
        public bool Remove (TreePath[] paths) {
-               return Remove(paths, true);     
+               return Remove(paths, true);
        }
 
        /// <summary>Removes the subtitles at the specified paths and selects the next or previous subtitle 
afterwards.</summary>
@@ -219,52 +219,52 @@ public class SubtitleView {
 
                if (!subtitles.Remove(paths))
                        return false; // The subtitles could not be removed
-               
+
                int firstIndex = Util.PathToInt(paths[0]);
                int indexToSelect = FindNearIndex(firstIndex, selectNext);
                if (indexToSelect != -1) {
-                       TreePath pathToSelect = Util.IntToPath(indexToSelect); 
+                       TreePath pathToSelect = Util.IntToPath(indexToSelect);
                        selection.Select(pathToSelect, true, true);
                }
                return true;
        }
 
-       /// <summary>Selects the subtitle below of current selected</summary>   
+       /// <summary>Selects the subtitle below of current selected</summary>
        public bool SelectNextSubtitle () {
                selection.SelectNext();
                return true;
-       }               
-    
+       }
+
     /* Private members */
-    
+
     /// <summary>Loads the subtitles</summary>
     private void Load (Subtitles subtitles) {
                this.subtitles = subtitles;
                tree.Model = subtitles.Model;
        Refresh();
-       
+
        tree.Model.RowInserted += OnModelRowInserted;
        tree.Model.RowDeleted += OnModelRowDeleted;
 
                EmitSubtitleCountChangedEvent();
     }
-       
+
     private void CreateColumns() {
        /* Number column */
        numberCol = Util.CreateTreeViewColumn(Catalog.GetString("No."), Util.ColumnWidth(tree, "000"), new 
CellRendererText(), RenderNumberCell);
-       
+
        /* Start, end and duration columns */
        int timeWidth = Util.ColumnWidth(tree, "00:00:00.000");
        startCol = Util.CreateTreeViewColumn(Catalog.GetString("Start"), timeWidth, new CellRendererText(), 
RenderStartCell);
        endCol = Util.CreateTreeViewColumn(Catalog.GetString("End"), timeWidth, new CellRendererText(), 
RenderEndCell);
        durationCol = Util.CreateTreeViewColumn(Catalog.GetString("Duration"), timeWidth, new 
CellRendererText(), RenderDurationCell);
-       
+
        /* Text column */
        int textWidth = Util.ColumnWidth(tree, "0123456789012345678901234567890123456789");
        CellRendererText textCellRenderer = new CellRendererText();
        textCellRenderer.Alignment = Pango.Alignment.Center;
        textCol = Util.CreateTreeViewColumn(Catalog.GetString("Text"), textWidth, textCellRenderer, 
RenderSubtitleTextCell);
-       
+
        /* Translation column */
        CellRendererText translationCellRenderer = new CellRendererText();
        translationCellRenderer.Alignment = Pango.Alignment.Center;
@@ -277,14 +277,14 @@ public class SubtitleView {
        tree.AppendColumn(durationCol);
        tree.AppendColumn(textCol);
        tree.AppendColumn(translationCol);
-       tree.AppendColumn(new TreeViewColumn()); //Appending to leave empty space to the right 
+       tree.AppendColumn(new TreeViewColumn()); //Appending to leave empty space to the right
     }
-       
+
        private void SetTranslationVisible (bool visible) {
                translationCol.Visible = visible;
        }
 
-               
+
        /// <summary>Finds the index that's near a row that has been removed at the specified index.</summary>
        /// <param name="removedIndex">The index of the removed row.</param>
        /// <param name="findNext">Whether to find the next or the previous row.</param>
@@ -292,13 +292,13 @@ public class SubtitleView {
        private int FindNearIndex (int removedIndex, bool findNext) {
                if (subtitles.Count == 0)
                        return -1;
-               
+
                if (findNext)
-                       return (subtitles.Collection.Contains(removedIndex) ? removedIndex : subtitles.Count 
- 1);              
+                       return (subtitles.Collection.Contains(removedIndex) ? removedIndex : subtitles.Count 
- 1);
                else
-                       return (removedIndex == 0 ? removedIndex : removedIndex - 1);   
+                       return (removedIndex == 0 ? removedIndex : removedIndex - 1);
        }
-       
+
        /* Cell Renderers */
 
        private void RenderNumberCell (TreeViewColumn column, CellRenderer cell, TreeModel treeModel, 
TreeIter iter) {
@@ -312,7 +312,7 @@ public class SubtitleView {
                else
                        renderer.Text = Util.TimeSpanToText(subtitles[iter].Times.Start);
        }
-       
+
        private void RenderEndCell (TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter) 
{
                CellRendererText renderer = cell as CellRendererText;
                if (Base.TimingModeIsFrames)
@@ -320,7 +320,7 @@ public class SubtitleView {
                else
                        renderer.Text = Util.TimeSpanToText(subtitles[iter].Times.End);
        }
-       
+
        private void RenderDurationCell (TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter 
iter) {
                CellRendererText renderer = cell as CellRendererText;
                if (Base.TimingModeIsFrames)
@@ -328,30 +328,30 @@ public class SubtitleView {
                else
                        renderer.Text = Util.TimeSpanToText(subtitles[iter].Times.Duration);
        }
-       
+
        private void RenderSubtitleTextCell (TreeViewColumn column, CellRenderer cell, TreeModel treeModel, 
TreeIter iter) {
                Subtitle subtitle = subtitles[iter];
                RenderTextCell(cell as CellRendererText, iter, subtitle.Text, subtitle.Style);
        }
-       
+
        private void RenderTranslationTextCell (TreeViewColumn column, CellRenderer cell, TreeModel 
treeModel, TreeIter iter) {
                Subtitle subtitle = subtitles[iter];
                RenderTextCell(cell as CellRendererText, iter, subtitle.Translation, subtitle.Style);
        }
 
        private void RenderTextCell (CellRendererText renderer, TreeIter iter, SubtitleText subtitleText, 
SubLib.Core.Domain.Style subtitleStyle) {
-               
+
                /* If there's no text, return empty text without line count */
                if (subtitleText.IsEmpty) {
                        renderer.Text = String.Empty;
                        return;
                }
-               
+
                string textMarkup = String.Empty;
                string stylePrefix = String.Empty;
                string styleSuffix = String.Empty;
                GetStyleMarkup(subtitleStyle, ref stylePrefix, ref styleSuffix);
-               
+
                bool first = true;
                bool viewLineLengths = Base.Config.PrefsViewLineLengths;
                foreach (string line in subtitleText) {
@@ -359,7 +359,7 @@ public class SubtitleView {
                        if (first)
                                first = false;
                }
-                       
+
                renderer.Markup = textMarkup;
        }
 
@@ -368,88 +368,88 @@ public class SubtitleView {
                        prefix += "<i>";
                        suffix = "</i>" + suffix;
                }
-                       
+
                if (subtitleStyle.Bold) {
                        prefix += "<b>";
                        suffix = "</b>" + suffix;
                }
-               
+
                if (subtitleStyle.Underline) {
                        prefix += "<u>";
                        suffix = "</u>" + suffix;
                }
        }
-       
-       
+
+
        /* Event members */
-       
+
        private void OnBaseInitFinished () {
                Base.DocumentLoaded += OnBaseDocumentLoaded;
                Base.DocumentUnloaded += OnBaseDocumentUnloaded;
                Base.TranslationLoaded += OnBaseTranslationLoaded;
                Base.TranslationUnloaded += OnBaseTranslationUnloaded;
                Base.TimingModeChanged += OnBaseTimingModeChanged;
-               
+
                (Base.Ui.Menus.GetMenuItem(WidgetNames.ViewLineLengths) as CheckMenuItem).Toggled += 
OnViewLineLengthsToggled;
        }
-       
+
        private void OnBaseDocumentLoaded (Document document) {
                tree.Sensitive = true;
        Load(document.Subtitles);
     }
-    
+
     private void OnBaseDocumentUnloaded (Document document) {
        if (document == null)
                return;
-       
+
        tree.Sensitive = false;
        search.Clear();
                SetTranslationVisible(false);
                SetEmptyModel();
-       
+
        tree.Model.RowInserted -= OnModelRowInserted;
-               tree.Model.RowDeleted -= OnModelRowDeleted;             
+               tree.Model.RowDeleted -= OnModelRowDeleted;
     }
-    
+
        private void OnModelRowInserted (object o, RowInsertedArgs args) {
                EmitSubtitleCountChangedEvent();
        }
-       
+
        private void OnModelRowDeleted (object o, RowDeletedArgs args) {
                EmitSubtitleCountChangedEvent();
        }
 
-        
+
     private void OnBaseTranslationLoaded () {
        SetTranslationVisible(true);
        Refresh();
     }
-    
+
     private void OnBaseTranslationUnloaded () {
        SetTranslationVisible(false);
     }
-    
+
     private void OnBaseTimingModeChanged (TimingMode timingMode) {
        Refresh();
     }
-       
+
        private void EmitSubtitleCountChangedEvent () {
                if (SubtitleCountChanged != null)
                        SubtitleCountChanged(subtitles.Count);
        }
-       
-       private void OnCurrentSubtitleChanged (int subtitleIndex) {             
+
+       private void OnCurrentSubtitleChanged (int subtitleIndex) {
                selection.Select(subtitleIndex, false, false, true);
        }
 
     private void SetEmptyModel () {
        tree.Model = new ListStore(typeof(Subtitle));
     }
-    
+
     private void OnViewLineLengthsToggled (object o, EventArgs args) {
        Refresh();
        }
-               
+
 }
 
 }
diff --git a/src/GnomeSubtitles/Ui/View/Subtitles.cs b/src/GnomeSubtitles/Ui/View/Subtitles.cs
index 4c7fce1..d5d47c5 100644
--- a/src/GnomeSubtitles/Ui/View/Subtitles.cs
+++ b/src/GnomeSubtitles/Ui/View/Subtitles.cs
@@ -26,33 +26,33 @@ namespace GnomeSubtitles.Ui.View {
 
 public class Subtitles : SubLib.Core.Domain.Subtitles {
        private ListStore model = new ListStore(typeof(Subtitle));
-       
-       
+
+
        public Subtitles (SubLib.Core.Domain.Subtitles subtitles) : base(subtitles.Collection, 
subtitles.Properties) {
                LoadModelFromCollection();
        }
 
-       
+
        /* Indexers */
-       
+
        public Subtitle this [int index] {
                get { return Collection[index]; }
        }
-       
+
        public Subtitle this [TreeIter iter] {
                get { return model.GetValue(iter, 0) as Subtitle; }
        }
-       
+
        public Subtitle this [TreePath path] {
                get { return this[path.Indices[0]]; }
        }
-       
+
        /* Public properties */
 
        public ListStore Model {
                get { return model; }
        }
-       
+
        public int Count {
                get { return Collection.Count; }
        }
@@ -62,13 +62,13 @@ public class Subtitles : SubLib.Core.Domain.Subtitles {
                Collection.Add(subtitle);
                model.AppendValues(subtitle);
        }
-       
+
        /// <summary>Adds a subtitle to the specified position on the list.</summary>
        public void Add (Subtitle subtitle, int index) {
                Collection.Add(subtitle, index);
                model.SetValue(model.Insert(index), 0, subtitle);
        }
-       
+
        /// <summary>Creates a subtitle and adds it after the specified position.</summary>
        /// <remarks>The timings of the new subtitle will be based on the subtitle that preceeds it.</remarks>
        public void AddNewAfter (int index) {
@@ -77,38 +77,38 @@ public class Subtitles : SubLib.Core.Domain.Subtitles {
                Subtitle newSubtitle = this[newIndex];
                model.SetValue(model.Insert(newIndex), 0, newSubtitle);
        }
-       
+
        /// <summary>Creates a subtitle and adds it before the specified position.</summary>
        /// <remarks>The timings of the new subtitle will be based on the subtitle that succeeds it.</remarks>
        public void AddNewBefore (int index) {
                Collection.AddNewBefore(index, Properties, Base.Config.PrefsTimingsTimeBetweenSubtitles);
                Subtitle newSubtitle = this[index];
-               model.SetValue(model.Insert(index), 0, newSubtitle);    
+               model.SetValue(model.Insert(index), 0, newSubtitle);
        }
-       
+
        /// <summary>Creates a subtitle and adds it to the specified position of the list.</summary>
        public void AddNewAt (int index) {
                Collection.AddNewAt(index, Properties);
                Subtitle newSubtitle = this[index];
                model.SetValue(model.Insert(index), 0, newSubtitle);
        }
-       
+
        public void AddNewAt (int index, TimeSpan start) {
                Collection.AddNewAt(index, Properties, start);
                Subtitle newSubtitle = this[index];
                model.SetValue(model.Insert(index), 0, newSubtitle);
        }
-       
+
        /// <summary>Removes a subtitle from the collection, given its <see cref="TreePath" />.</summary>
        /// <returns>Whether the subtitle could be removed.</returns>
        public bool Remove (TreePath path) {
                int index = Util.PathToInt(path);
                if (!Collection.Contains(index))
                        return false;
-                       
+
                TreeIter iter;
                model.GetIter(out iter, path);
-               
+
                Collection.Remove(index);
                model.Remove(ref iter);
                return true;
@@ -119,7 +119,7 @@ public class Subtitles : SubLib.Core.Domain.Subtitles {
        public bool Remove (int index) {
                if (!Collection.Contains(index))
                        return false;
-       
+
                TreeIter iter;
                model.GetIterFromString(out iter, index.ToString());
 
@@ -127,19 +127,19 @@ public class Subtitles : SubLib.Core.Domain.Subtitles {
                model.Remove(ref iter);
                return true;
        }
-               
+
        /// <summary>Removes a collection of subtitles from the subtitle collection, given their multiple 
<see cref="TreePath" />.</summary>
        /// <param name="paths">The collection of paths corresponding to the subtitles to be removed. Its 
elements must be ordered without repetition.</param>
        /// <returns>Whether the subtitles could be removed. This method removes all of the subtitles or 
none.</returns>
        public bool Remove (TreePath[] paths) { //TODO seems to perform worse than before, for no visible 
reason. Check out. Maybe has to due with event being thrown on count change?
                if ((paths == null) || (paths.Length == 0))
                        return true;
-       
+
                /* Check if the last member is within the valid range */
                int lastIndex = Util.PathToInt(paths[paths.Length - 1]);
                if (!Collection.Contains(lastIndex))
                        return false;
-               
+
                for (int index = 0 ; index < paths.Length ; index++) {
                        TreePath path = paths[index];
                        int subtitleIndex = Util.PathToInt(path) - index; //Subtract pathIndex because 
indexes decrement as subtitles are removed.
@@ -147,23 +147,23 @@ public class Subtitles : SubLib.Core.Domain.Subtitles {
                }
                return true;
        }
-       
+
        public bool RemoveRange (TreePath firstPath, TreePath lastPath) {
                if ((firstPath == null) || (lastPath == null))
                        return false;
-                       
+
                int firstSubtitleNumber = Util.PathToInt(firstPath);
                int lastSubtitleNumber = Util.PathToInt(lastPath);
                if ((firstSubtitleNumber < 0) || (firstSubtitleNumber > lastSubtitleNumber) || 
(lastSubtitleNumber >= Collection.Count))
                        return false;
-                       
+
                for (int index = firstSubtitleNumber ; index <= lastSubtitleNumber ; index++) {
                        if (!Remove(firstSubtitleNumber)) //the index is constant as subtitles are removed
                                return false;
                }
                return true;
        }
-       
+
        /// <summary>Loads possible extra subtitles at the end of the model.</summary>
        /// <remarks>Extra subtitles exist if subtitles were added to the base collection.</remarks>
        public void AddExtra (int extraCount) {
@@ -174,7 +174,7 @@ public class Subtitles : SubLib.Core.Domain.Subtitles {
 
                if (Count == 0)
                        AddNewAt(0);
-               
+
                for (int index = Count - 1 ; index < lastIndex ; index++)
                        AddNewAfter(index);
        }
diff --git a/src/GnomeSubtitles/Ui/WidgetNames.cs b/src/GnomeSubtitles/Ui/WidgetNames.cs
index c69a042..47cb37f 100644
--- a/src/GnomeSubtitles/Ui/WidgetNames.cs
+++ b/src/GnomeSubtitles/Ui/WidgetNames.cs
@@ -26,7 +26,7 @@ public class WidgetNames {
        public const string MainPaned = "mainPaned";
 
        /* Menu Bar */
-       
+
        /* File Menu */
        public const string FileSave = "fileSave";
        public const string FileSaveAs = "fileSaveAs";
@@ -38,7 +38,7 @@ public class WidgetNames {
        public const string FileTranslationSaveAs = "fileTranslationSaveAs";
        public const string FileTranslationClose = "fileTranslationClose";
        public const string FileClose = "fileClose";
-       
+
        /* Edit Menu */
        public const string EditUndo = "editUndo";
        public const string EditRedo = "editRedo";
@@ -53,7 +53,7 @@ public class WidgetNames {
        public const string EditDeleteSubtitles = "editDeleteSubtitles";
        public const string EditSplit = "editSplit";
        public const string EditMerge = "editMerge";
-       
+
        /* View Menu */
        public const string ViewTimes = "viewTimes";
        public const string ViewFrames = "viewFrames";
@@ -61,7 +61,7 @@ public class WidgetNames {
        public const string ViewVideo = "viewVideo";
        public const string ViewVideoSubtitlesText = "viewVideoSubtitlesText";
        public const string ViewVideoSubtitlesTranslation = "viewVideoSubtitlesTranslation";
-       
+
        /* Search Menu */
        public const string SearchFind = "searchFind";
        public const string SearchFindNext = "searchFindNext";
@@ -74,7 +74,7 @@ public class WidgetNames {
        public const string TimingsSynchronize = "timingsSynchronize";
        public const string TimingsAdjust = "timingsAdjust";
        public const string TimingsShift = "timingsShift";
-       
+
        /* Video Menu */
        public const string VideoClose = "videoClose";
        public const string VideoPlayPause = "videoPlayPause";
@@ -87,7 +87,7 @@ public class WidgetNames {
        public const string VideoLoopSelectionPlayback = "videoLoopSelectionPlayback";
        public const string VideoSetSubtitleStart = "videoSetSubtitleStart";
        public const string VideoSetSubtitleEnd = "videoSetSubtitleEnd";
-       
+
        /* Tools Menu */
        public const string ToolsAutocheckSpelling = "toolsAutocheckSpelling";
        public const string ToolsSetTextLanguage = "toolsSetTextLanguage";
@@ -109,7 +109,7 @@ public class WidgetNames {
        public const string BoldButton = "boldToolButton";
        public const string ItalicButton = "italicToolButton";
        public const string UnderlineButton = "underlineToolButton";
-               
+
        /* Video */
        public const string VideoAreaHBox = "videoAreaHBox";
        public const string VideoTimingsVBox = "videoTimingsVBox";
@@ -138,7 +138,7 @@ public class WidgetNames {
 
        /* Subtitle View */
        public const string SubtitleView = "subtitleView";
-       
+
        /* Subtitle Edit */
        public const string SubtitleEdit = "subtitleEdit";
        public const string StartSpinButton = "startSpinButton";
@@ -147,12 +147,12 @@ public class WidgetNames {
        public const string SubtitleEditText = "subtitleEditText";
        public const string SubtitleEditTranslation = "subtitleEditTranslation";
        public const string SubtitleEditTranslationScrolledWindow = "subtitleEditTranslationScrolledWindow";
-       
+
        /* Status Bar */
        public const string MessageStatusbar = "messageStatusbar";
        public const string PositionStatusbar = "positionStatusbar";
        public const string OverwriteStatusbar = "overwriteStatusbar";
-       
+
 }
 
 }
diff --git a/src/SubLib/Core/Domain/Enumerations.cs b/src/SubLib/Core/Domain/Enumerations.cs
index bb8d1c0..d228e8f 100644
--- a/src/SubLib/Core/Domain/Enumerations.cs
+++ b/src/SubLib/Core/Domain/Enumerations.cs
@@ -25,7 +25,7 @@ namespace SubLib.Core.Domain {
 public enum TimingMode {
        /// <summary>Time based timing mode.</summary>
        Times,
-       
+
        /// <summary>Frame based timing mode.</summary>
        Frames
 };
@@ -33,73 +33,73 @@ public enum TimingMode {
 /// <summary>
 /// Represents a supported subtitle file type.
 /// </summary>
-public enum SubtitleType { 
+public enum SubtitleType {
        /// <summary>Unknown subtitle type.</summary>
        Unknown ,
-       
+
        /// <summary>Micro DVD subtitle type.</summary>
        MicroDVD,
-       
+
        /// <summary>SubRip subtitle type.</summary>
        SubRip,
-       
+
        /// <summary>Sub Station Alpha subtitle type.</summary>
     SubStationAlpha,
-       
+
        /// <summary>Advanced Sub Station Alpha subtitle type.</summary>
        AdvancedSubStationAlpha,
-       
+
        /// <summary>MPlayer subtitle type.</summary>
        MPlayer,
-       
+
        /// <summary>MPlayer2 subtitle type.</summary>
        MPlayer2,
-       
+
        /// <summary>MPSub subtitle type.</summary>
        MPSub,
-       
+
        /// <summary>SubViewer 1.0 subtitle type.</summary>
     SubViewer1,
-    
+
     /// <summary>SubViewer 2.0 subtitle type.</summary>
     SubViewer2,
 
        /// <summary>AQ Title subtitle type.</summary>
        AQTitle,
-       
+
        /// <summary>MacSUB subtitle type.</summary>
        MacSUB,
-               
+
        /// <summary>Phoenix Japanimation Society subtitle type.</summary>
        PhoenixJapanimationSociety,
-               
+
        /// <summary>Panimator subtitle type.</summary>
        Panimator,
-               
+
        /// <summary>Sofni subtitle type.</summary>
        Sofni,
-               
+
        /// <summary>SubCreator 1.x subtitle type.</summary>
        SubCreator1x,
-               
+
        /// <summary>ViPlay Subtitle File subtitle type.</summary>
        ViPlaySubtitleFile,
-               
+
        /// <summary>DKS Subtitle Format subtitle type.</summary>
        DKSSubtitleFormat,
-       
+
        /// <summary>Power DivX subtitle type.</summary>
        PowerDivX,
-       
+
     /// <summary>Karaoke Lyrics LRC subtitle type.</summary>
     KaraokeLyricsVKT,
-    
+
     /// <summary>Karaoke Lyrics LRC subtitle type.</summary>
     KaraokeLyricsLRC,
 
     /// <summary>Adobe Encore DVD subtitle type.</summary>
        AdobeEncoreDVD,
-       
+
        /// <summary>FAB Subtitler subtitle type.</summary>
        FABSubtitler
 };
@@ -107,16 +107,16 @@ public enum SubtitleType {
 /// <summary>
 /// Represents a type of newline.
 /// </summary>
-public enum NewlineType { 
+public enum NewlineType {
        /// <summary>Unknown newline type.</summary>
        Unknown ,
 
        /// <summary>Macintosh newline type.</summary>
     Macintosh,
-       
+
        /// <summary>Unix newline type.</summary>
        Unix,
-       
+
        /// <summary>Windows newline type.</summary>
        Windows
 
@@ -128,22 +128,22 @@ public enum NewlineType {
 public enum SubtitleTextType {
        /// <summary>The text.</summary>
        Text,
-       
+
        /// <summary>The translation.</summary>
        Translation
 };
 
-       
+
 /// <summary>
 /// Represents the timing mode used by a subtitle format.
 /// </summary>
 public enum SubtitleMode {
        /// <summary>Time based timing mode.</summary>
        Times,
-       
+
        /// <summary>Frame based timing mode.</summary>
        Frames,
-       
+
        /// <summary>Time and Frame based timing mode.</summary>
        Both
 };
diff --git a/src/SubLib/Core/Domain/FileProperties.cs b/src/SubLib/Core/Domain/FileProperties.cs
index 9113bc8..61c1f2e 100644
--- a/src/SubLib/Core/Domain/FileProperties.cs
+++ b/src/SubLib/Core/Domain/FileProperties.cs
@@ -30,7 +30,7 @@ public class FileProperties : ICloneable {
        private Encoding encoding = null; //The character coding of the file
        private SubtitleType subtitleType = SubtitleType.Unknown; //The subtitle type of the file
        private TimingMode timingMode = TimingMode.Times; //The timing mode used in the file (some subtitle 
types support both)
-       
+
        /* Used for writing only */
        private NewlineType newlineType = NewlineType.Unknown;
 
@@ -52,7 +52,7 @@ public class FileProperties : ICloneable {
                this.timingMode = timingMode;
                this.newlineType = newlineType;
        }
-       
+
        /// <summary>Creates a new instance of the <see cref="FileProperties" /> class, given its 
properties.</summary>
        /// <param name="path">The file's path.</param>
        /// <param name="encoding">The file's character coding.</param>
@@ -69,7 +69,7 @@ public class FileProperties : ICloneable {
        public FileProperties(string path, Encoding encoding, TimingMode timingMode)
                : this(path, encoding, SubtitleType.Unknown, timingMode) {
        }
-               
+
        /// <summary>Creates a new instance of the <see cref="FileProperties" /> class, given the file's 
path.</summary>
        /// <param name="path">The file's path.</param>
        public FileProperties (string path) : this(path, null, SubtitleType.Unknown, TimingMode.Times) {
@@ -83,59 +83,59 @@ public class FileProperties : ICloneable {
                get { return path; }
                set { path = System.IO.Path.GetFullPath(value); }
        }
-       
+
        /// <summary>The file's filename.</summary>
        /// <remarks>See <see cref="System.IO.Path.GetFileName" /> for more information.</remarks>
        public string Filename {
                get { return System.IO.Path.GetFileName(path); }
        }
-       
+
        /// <summary>The file's filename without its extension.</summary>
        /// <remarks>See <see cref="System.IO.Path.GetFileNameWithoutExtension" /> for more 
information.</remarks>
        public string FilenameWithoutExtension {
                get { return System.IO.Path.GetFileNameWithoutExtension(path); }
        }
-       
+
        /// <summary>The file's directory.</summary>
        /// <remarks>See <see cref="System.IO.Path.GetDirectoryName" /> for more information.</remarks>
        public string Directory {
                get { return System.IO.Path.GetDirectoryName(path); }
        }
-       
+
        /// <summary>Whether the path is rooted.</summary>
        /// <remarks>See <see cref="System.IO.Path.IsPathRooted" /> for more information.</remarks>
        public bool IsPathRooted {
                get { return System.IO.Path.IsPathRooted(path); }
        }
-       
+
        /// <summary>The character coding used in the file.</summary>
        public Encoding Encoding {
                get { return encoding; }
                set { encoding = value; }
        }
-       
+
        /// <summary>The timing mode used in the file.</summary>
        /// <remarks>This is more useful for the subtitle types that support both the time and frame 
modes.</remarks>
        public TimingMode TimingMode {
                get { return timingMode; }
                set { timingMode = value; }
        }
-       
+
        /// <summary>The type of the subtitles.</summary>
        public SubtitleType SubtitleType {
                get { return subtitleType; }
                set { subtitleType = value; }
        }
-       
+
        /// <summary>The type of newline used in the file.</summary>
        public NewlineType NewlineType {
                get { return newlineType; }
                set { newlineType = value; }
        }
-       
-       
+
+
        /* Public methods */
-       
+
        public object Clone () {
                return this.MemberwiseClone();
        }
diff --git a/src/SubLib/Core/Domain/Frames.cs b/src/SubLib/Core/Domain/Frames.cs
index 2d73a52..d428feb 100644
--- a/src/SubLib/Core/Domain/Frames.cs
+++ b/src/SubLib/Core/Domain/Frames.cs
@@ -29,10 +29,10 @@ public class Frames {
        private double start = 0;
        private double end = 0;
        private Subtitle subtitle = null;
-       
-       
+
+
        /* Public properties */
-       
+
        /// <summary>The start frame.</summary>
        /// <remarks>Upon setting the start frame, the start time (<see cref="Times.Start">Times.Start</see>) 
is also updated based on
        /// the <see cref="SubtitleProperties.CurrentFrameRate" />.</remarks>
@@ -43,7 +43,7 @@ public class Frames {
                        subtitle.UpdateStartTimeFromFrames();
                }
        }
-       
+
        /// <summary>The end frame.</summary>
        /// <remarks>Upon setting the end frame, the end time (<see cref="Times.End">Times.End</see>) is also 
updated based on
        /// the <see cref="SubtitleProperties.CurrentFrameRate" />.</remarks>
@@ -54,18 +54,18 @@ public class Frames {
                        subtitle.UpdateEndTimeFromFrames();
                }
        }
-       
+
        /// <summary>The duration, in frames.</summary>
        /// <remarks>Setting the duration maintains the start frame and changes the end frame.
        /// Upon setting the duration, the end time (<see cref="Times.End">Times.End</see>) is also updated 
based on
        /// the <see cref="SubtitleProperties.CurrentFrameRate" />.</remarks>
        public int Duration {
-               get { return End - Start; }     
+               get { return End - Start; }
                set { End = Start + value; }
        }
-       
+
        /* Public methods */
-       
+
        /// <summary>Shifts the subtitle with a specified amount of frames.</summary>
        /// <param name="frames">The number of frames to shift the subtitle with, which can be positive or 
negative.</param>
        public void Shift (int frames) {
@@ -73,7 +73,7 @@ public class Frames {
                PreciseEnd += frames;
                subtitle.UpdateTimesFromFrames();
        }
-       
+
        public override string ToString() {
                return Start + "->" + End;
        }
@@ -81,50 +81,50 @@ public class Frames {
        public Frames Clone (Subtitle subtitleClone) {
                Frames clone = this.MemberwiseClone() as Frames;
                clone.SetFieldsForDeepClone(subtitleClone);
-               return clone;   
+               return clone;
        }
 
 
                /* Internal members */
-               
+
        internal Frames (Subtitle subtitle) {
                this.subtitle = subtitle;
        }
-       
+
        internal Frames (Subtitle subtitle, int start, int end) {
                this.start = start;
                this.end = end;
-               this.subtitle = subtitle;       
+               this.subtitle = subtitle;
        }
-       
+
        /// <remarks>Doesn't update times.</remarks>
        internal double PreciseStart {
                get { return start; }
                set { start = value; }
        }
-       
+
        /// <remarks>Doesn't update times.</remarks>
        internal double PreciseEnd {
                get { return end; }
                set { end = value; }
        }
-       
+
        /// <remarks>Doesn't update times.</remarks>
        internal double PreciseDuration {
                get { return end - start; }
                set { end = start + value; }
        }
-       
+
        internal void Scale (double factor, int baseFrame) {
-               
+
                PreciseStart = SyncUtil.Scale(PreciseStart, baseFrame, factor);
                PreciseEnd = SyncUtil.Scale(PreciseEnd, baseFrame, factor);
 
-               subtitle.UpdateTimesFromFrames();       
+               subtitle.UpdateTimesFromFrames();
        }
-       
+
        /* Private members */
-       
+
        private void SetFieldsForDeepClone (Subtitle subtitle) {
                this.subtitle = subtitle;
        }
diff --git a/src/SubLib/Core/Domain/Headers.cs b/src/SubLib/Core/Domain/Headers.cs
index ddc39ad..44d91a3 100644
--- a/src/SubLib/Core/Domain/Headers.cs
+++ b/src/SubLib/Core/Domain/Headers.cs
@@ -22,7 +22,7 @@ using System.IO;
 using System.Text;
 
 namespace SubLib.Core.Domain {
-       
+
 /// <summary>Represents the headers of the supported subtitle formats.</summary>
 public class Headers : ICloneable {
 
@@ -58,9 +58,9 @@ public class Headers : ICloneable {
        private int delay = 0;
        private int cdTrack = 0;
 
-       
+
        /* Public properties */
-       
+
        /// <summary>The movie's title.</summary>
        public string Title {
                get { return title; }
@@ -72,7 +72,7 @@ public class Headers : ICloneable {
                get { return author; }
                set { author = value; }
        }
-       
+
        /// <summary>The movie's author.</summary>
        public string MovieAuthor {
                get { return movieAuthor; }
@@ -84,19 +84,19 @@ public class Headers : ICloneable {
                get { return artist; }
                set { artist = value; }
        }
-       
+
        /// <summary>The subtitles' album.</summary>
        public string Album {
                get { return album; }
                set { album = value; }
        }
-       
+
        /// <summary>The video' source.</summary>
        public string VideoSource {
                get { return videoSource; }
                set { videoSource = value; }
        }
-       
+
        /// <summary>The subtitles' source.</summary>
        public string SubtitlesSource {
                get { return subtitlesSource; }
@@ -114,13 +114,13 @@ public class Headers : ICloneable {
                get { return version; }
                set { version = value; }
        }
-       
+
        /// <summary>A comment or note on the subtitles.</summary>
        public string Comment {
                get { return comment; }
                set { comment = value; }
        }
-       
+
        /// <summary>The subtitles' font color.</summary>
        public string FontColor {
                get { return fontColor; }
@@ -138,13 +138,13 @@ public class Headers : ICloneable {
                get { return fontName; }
                set { fontName = value; }
        }
-       
+
        /// <summary>The File properties, in the format 'size,md5'.</summary>
        public string FileProperties {
                get { return fileProperties; }
                set { fileProperties = value; }
        }
-       
+
        /// <summary>The Media Type of the subtitles, which can be 'VIDEO' or 'AUDIO'.</summary>
        /// <remarks>This property is only set if the value is 'VIDEO' or 'AUDIO'. It's case 
insensitive.</remarks>
        public string MediaType {
@@ -155,49 +155,49 @@ public class Headers : ICloneable {
                                mediaType = type;
                }
        }
-       
+
        /// <summary>The Original Script of the subtitles.</summary>
        public string OriginalScript {
                get { return originalScript; }
                set { originalScript = value; }
        }
-       
+
        /// <summary>The Original Translation of the subtitles.</summary>
        public string OriginalTranslation {
                get { return originalTranslation; }
                set { originalTranslation = value; }
        }
-       
+
        /// <summary>The Original Editing of the subtitles.</summary>
        public string OriginalEditing {
                get { return originalEditing; }
                set { originalEditing = value; }
        }
-       
+
        /// <summary>The Original Timing of the subtitles.</summary>
        public string OriginalTiming {
                get { return originalTiming; }
                set { originalTiming = value; }
        }
-       
+
        /// <summary>The Original Script Checking of the subtitles.</summary>
        public string OriginalScriptChecking {
                get { return originalScriptChecking; }
                set { originalScriptChecking = value; }
        }
-       
+
        /// <summary>The Script Updated By of the subtitles.</summary>
        public string ScriptUpdatedBy {
                get { return scriptUpdatedBy; }
                set { scriptUpdatedBy = value; }
        }
-       
+
        /// <summary>The Collisions of the subtitles.</summary>
        public string Collisions {
                get { return collisions; }
                set { collisions = value; }
        }
-       
+
        /// <summary>The Timer of the subtitles.</summary>
        public string Timer {
                get { return timer; }
@@ -209,23 +209,23 @@ public class Headers : ICloneable {
                get { return frameRate; }
                set { frameRate = value; }
        }
-       
+
        /// <summary>The subtitles' date.</summary>
        public string Date {
                get { return date; }
                set { date = value; }
        }
-       
+
        /// <summary>The PlayResX of the subtitles.</summary>
        public int PlayResX {
                get { return playResX; }
                set { playResX = value; }
        }
-       
+
        /// <summary>The PlayResX of the subtitles as text.</summary>
        public string PlayResXAsText {
                get { return playResX.ToString(); }
-               set { 
+               set {
                        try {
                                playResX = Convert.ToInt32(value);
                        }
@@ -233,17 +233,17 @@ public class Headers : ICloneable {
                        }
                 }
        }
-       
+
        /// <summary>The PlayResY of the subtitles.</summary>
        public int PlayResY {
                get { return playResY; }
                set { playResY = value; }
        }
-       
+
        /// <summary>The PlayResY of the subtitles as text.</summary>
        public string PlayResYAsText {
                get { return playResY.ToString(); }
-               set { 
+               set {
                        try {
                                playResY = Convert.ToInt32(value);
                        }
@@ -251,13 +251,13 @@ public class Headers : ICloneable {
                        }
                 }
        }
-       
+
        /// <summary>The PlayDepth of the subtitles.</summary>
        public int PlayDepth {
                get { return playDepth; }
                set { playDepth = value; }
        }
-       
+
        /// <summary>The PlayResY of the subtitles as text.</summary>
        public string PlayDepthAsText {
                get { return playDepth.ToString(); }
@@ -269,17 +269,17 @@ public class Headers : ICloneable {
                        }
                 }
        }
-       
+
        /// <summary>The subtitles' font size.</summary>
        public int FontSize {
                get { return fontSize; }
                set { fontSize = value; }
        }
-       
+
        /// <summary>The subtitles' font size as text.</summary>
        public string FontSizeAsText {
                get { return fontSize.ToString(); }
-               set { 
+               set {
                        try {
                                fontSize = Convert.ToInt32(value);
                        }
@@ -287,17 +287,17 @@ public class Headers : ICloneable {
                        }
                 }
        }
-       
+
        /// <summary>The delay of the subtitles.</summary>
        public int Delay {
                get { return delay; }
                set { delay = value; }
        }
-       
+
        /// <summary>The delay of the subtitles as text.</summary>
        public string DelayAsText {
                get { return delay.ToString(); }
-               set { 
+               set {
                        try {
                                delay = Convert.ToInt32(value);
                        }
@@ -305,17 +305,17 @@ public class Headers : ICloneable {
                        }
                 }
        }
-               
+
        /// <summary>The CD track of the subtitles.</summary>
        public int CDTrack {
                get { return cdTrack; }
                set { cdTrack = value; }
        }
-       
+
        /// <summary>The CD track of the subtitles as text.</summary>
        public string CDTrackAsText {
                get { return cdTrack.ToString(); }
-               set { 
+               set {
                        try {
                                cdTrack = Convert.ToInt32(value);
                        }
@@ -326,11 +326,11 @@ public class Headers : ICloneable {
 
 
        /* Public methods */
-       
+
        public object Clone () {
                return this.MemberwiseClone();
        }
-       
+
 }
 
 }
\ No newline at end of file
diff --git a/src/SubLib/Core/Domain/IncompleteSubtitle.cs b/src/SubLib/Core/Domain/IncompleteSubtitle.cs
index e66a010..0db3f8e 100644
--- a/src/SubLib/Core/Domain/IncompleteSubtitle.cs
+++ b/src/SubLib/Core/Domain/IncompleteSubtitle.cs
@@ -20,14 +20,14 @@
 using System;
 
 namespace SubLib.Core.Domain {
-       
+
 /// <summary>Represents an incomplete subtitle.</summary>
 /// <remarks>An incomplete subtitle is characterized by its incomplete text and
-/// the valid subtitle that precedes it.</remarks>     
+/// the valid subtitle that precedes it.</remarks>
 public class IncompleteSubtitle {
        private int previous = 0;
        private string text = String.Empty;
-       
+
        /// <summary>Initializes a new instance of the <see cref="IncompleteSubtitle" /> class,
        /// given the index of its preceding valid subtitle and the incomplete text.</summary>
        /// <param name="previous">The index of the preceding valid subtitle.</param>
@@ -36,19 +36,19 @@ public class IncompleteSubtitle {
                this.previous = previous;
                this.text = text;
        }
-       
+
        /// <summary>The index of the preceding valid subtitle.</summary>
        public int Previous {
                get { return previous; }
                set { previous = value; }
        }
-       
+
        /// <summary>The incomplete subtitle's text.</summary>
        public string Text {
                get { return text; }
                set { text = value; }
        }
-  
+
        public override string ToString(){
                return "* After " + previous + ": " + text + "\n";
        }
diff --git a/src/SubLib/Core/Domain/IncompleteSubtitleCollection.cs 
b/src/SubLib/Core/Domain/IncompleteSubtitleCollection.cs
index b9f5895..ea41570 100644
--- a/src/SubLib/Core/Domain/IncompleteSubtitleCollection.cs
+++ b/src/SubLib/Core/Domain/IncompleteSubtitleCollection.cs
@@ -20,36 +20,36 @@
 using System.Collections;
 
 namespace SubLib.Core.Domain {
-       
+
 /// <summary>A container that represents a collection of incomplete subtitles.</summary>
 public class IncompleteSubtitleCollection {
        private ArrayList subtitles = new ArrayList();
-       
-       
+
+
        /// <summary>The number of subtitles in the collection.</summary>
        public int Count {
                get { return subtitles.Count; }
        }
-       
+
        /// <summary>Returns an enumerator that can iterate through the collection.</summary>
        /// <returns>An <see cref="IEnumerator" /> for the entire <see cref="IncompleteSubtitleCollection" 
/>.</returns>
        public IEnumerator GetEnumerator () {
                return subtitles.GetEnumerator();
        }
-       
+
        /// <summary>Returns the subtitle at the specified index.</summary>
        /// <param name="index">The zero-based subtitle's index.</param>
        /// <returns>The subtitle at the specified index.</returns>
        public IncompleteSubtitle Get (int index){
                return (IncompleteSubtitle)subtitles[index];
        }
-       
+
        /// <summary>Adds an incomplete subtitle to the end of the collection.</summary>
        /// <param name="subtitle">The subtitle to add.</param>
        public void Add (IncompleteSubtitle subtitle){
                subtitles.Add(subtitle);
        }
-       
+
        /// <summary>Adds an incomplete subtitle to the collection, inserting it at the specified 
index.</summary>
        /// <param name="subtitle">The subtitle to add.</param>
        /// <param name="index">The zero-based index at which the subtitle should be inserted.</param>
diff --git a/src/SubLib/Core/Domain/Style.cs b/src/SubLib/Core/Domain/Style.cs
index c786693..2b1662a 100644
--- a/src/SubLib/Core/Domain/Style.cs
+++ b/src/SubLib/Core/Domain/Style.cs
@@ -21,16 +21,16 @@ using System;
 using System.Collections;
 
 namespace SubLib.Core.Domain {
-       
+
 /// <summary>Represents a text style, including Bold, Italic and Underline.</summary>
 public class Style : ICloneable {
        private bool bold = false;
        private bool italic = false;
        private bool underline = false;
-       
+
        /// <summary>Initializes a new instance of the <see cref="SubLib.Style" /> class.</summary>
        public Style () {}
-       
+
        /// <summary>
        /// Initializes a new instance of the <see cref="Style" /> class, given the
        /// specified style values.</summary>
@@ -45,25 +45,25 @@ public class Style : ICloneable {
 
 
        /* Public properties */
-       
+
        /// <summary>Whether the style is bold.</summary>
        public bool Bold {
                get { return bold; }
                set { bold = value; }
        }
-       
+
        /// <summary>Whether the style is italic.</summary>
        public bool Italic {
                get { return italic; }
                set { italic = value; }
        }
-       
+
        /// <summary>Whether the style is underlined.</summary>
        public bool Underline {
                get { return underline; }
                set { underline = value; }
        }
-       
+
        /// <summary>Whether any of the style values is enabled.</summary>
        public bool Enabled {
                get { return Bold || Italic || Underline; }
@@ -79,8 +79,8 @@ public class Style : ICloneable {
                        result += " underline";
                return result;
        }
-       
-       
+
+
        /* Public methods */
 
        public object Clone() {
diff --git a/src/SubLib/Core/Domain/Subtitle.cs b/src/SubLib/Core/Domain/Subtitle.cs
index 66c2712..998a233 100644
--- a/src/SubLib/Core/Domain/Subtitle.cs
+++ b/src/SubLib/Core/Domain/Subtitle.cs
@@ -21,7 +21,7 @@ using SubLib.Core.Timing;
 using System;
 
 namespace SubLib.Core.Domain {
-       
+
 /// <summary>Represents a subtitle, including its time settings, text and text style.</summary>
 public class Subtitle {
        private SubtitleProperties properties = null;
@@ -30,7 +30,7 @@ public class Subtitle {
        private SubtitleText text = null;
        private SubtitleText translation = null;
        private Style style = null;
-       
+
        /// <summary>Initializes a new instance of the <see cref="Subtitle" /> class, given the
        /// global subtitles' properties and the subtitle's text and style.</summary>
        /// <param name="properties">The subtitles' properties.</param>
@@ -40,11 +40,11 @@ public class Subtitle {
                this.properties = properties;
                this.text = text;
                this.style = style;
-               
+
                times = new Times(this);
                frames = new Frames(this);
        }
-       
+
        /// <summary>Initializes a new instance of the <see cref="Subtitle" /> class, given the
        /// global subtitles' properties and its start and end times.</summary>
        /// <param name="properties">The subtitles' properties.</param>
@@ -56,7 +56,7 @@ public class Subtitle {
                times.Start = startTime;
                times.End = endTime;
        }
-       
+
        /// <summary>Initializes a new instance of the <see cref="Subtitle" /> class, given the
        /// global subtitles' properties and its start and end frames.</summary>
        /// <param name="properties">The subtitles' properties.</param>
@@ -68,146 +68,146 @@ public class Subtitle {
                frames.Start = startFrame;
                frames.End = endFrame;
        }
-       
+
        /// <summary>Initializes a new instance of the <see cref="Subtitle" /> class, given the
        /// global subtitles' properties.</summary>
        /// <param name="properties">The subtitles' properties.</param>
        public Subtitle (SubtitleProperties properties)
                        : this(properties, new SubtitleText(), new Style()){
        }
-       
+
        private Subtitle () {
        }
-       
-       
+
+
        /* Public properties */
-       
+
        /// <summary>The subtitle's text.</summary>
        public SubtitleText Text {
                get { return text; }
-               set { text = value; }   
+               set { text = value; }
        }
-       
+
        /// <summary>The subtitle's translated text.</summary>
        public SubtitleText Translation {
                get {
                        if (translation == null)
                                translation = new SubtitleText();
-                       
+
                        return translation;
                }
        }
-       
+
        public bool HasTranslation {
                get { return this.translation != null; }
        }
-       
+
        /// <summary>The subtitle's text style.</summary>
        public Style Style {
                get { return style; }
                set { style = value; }
        }
-       
+
        /// <summary>The subtitle's times.</summary>
        public Times Times {
                get { return times; }
        }
-       
+
        /// <summary>The subtitle's frames.</summary>
        public Frames Frames {
                get { return frames; }
        }
-       
+
        /* Public methods */
-       
+
        /// <summary></summary>
        /// <remarks>SubtitleProperties is not cloned and should be set afterwards.</remarks>
        public Subtitle Clone (SubtitleProperties propertiesClone) {
                Subtitle subtitleClone = new Subtitle();
-               
+
                Times timesClone = this.times.Clone(subtitleClone);
                Frames framesClone = this.frames.Clone(subtitleClone);
                SubtitleText textClone = this.text.Clone() as SubtitleText;
                SubtitleText translationClone = (this.translation != null ? this.translation.Clone() as 
SubtitleText : null);
                Style styleClone = this.style.Clone() as Style;
                subtitleClone.SetFieldsForDeepClone(propertiesClone, timesClone, framesClone, textClone, 
translationClone, styleClone);
-               
+
                return subtitleClone;
        }
-               
+
        public override string ToString () {
                return "* " + Times + " (" + Frames + ") " + Style + "\n" + Text.ToString();
        }
-       
-       
+
+
        /* Internal properties */
-       
+
        internal SubtitleProperties Properties {
                set { this.properties = value; }
        }
-       
-       
+
+
        /* Internal methods */
 
        internal void UpdateFramesFromTimes (float frameRate) {
                UpdateStartFrameFromTimes(frameRate);
                UpdateEndFrameFromTimes(frameRate);
        }
-       
+
        internal void UpdateFramesFromTimes () {
                UpdateStartFrameFromTimes();
                UpdateEndFrameFromTimes();
        }
-       
+
        internal void UpdateTimesFromFrames (float frameRate) {
                UpdateStartTimeFromFrames(frameRate);
                UpdateEndTimeFromFrames(frameRate);
        }
-       
+
        internal void UpdateTimesFromFrames () {
                UpdateStartTimeFromFrames();
                UpdateEndTimeFromFrames();
        }
-       
+
        internal void UpdateStartFrameFromTimes (float frameRate) {
                frames.PreciseStart = TimingUtil.TimeToFrames(times.PreciseStart, frameRate);
        }
-       
+
        internal void UpdateStartFrameFromTimes () {
                UpdateStartFrameFromTimes(properties.CurrentFrameRate);
        }
-       
+
        internal void UpdateEndFrameFromTimes (float frameRate) {
                frames.PreciseEnd = TimingUtil.TimeToFrames(times.PreciseEnd, frameRate);
        }
-       
+
        internal void UpdateEndFrameFromTimes () {
                UpdateEndFrameFromTimes(properties.CurrentFrameRate);
        }
-       
+
        internal void UpdateStartTimeFromFrames (float frameRate) {
                times.PreciseStart = TimingUtil.FramesToTime(frames.PreciseStart, frameRate);
        }
-       
+
        internal void UpdateStartTimeFromFrames () {
                UpdateStartTimeFromFrames(properties.CurrentFrameRate);
        }
-       
+
        internal void UpdateEndTimeFromFrames (float frameRate) {
                times.PreciseEnd = TimingUtil.FramesToTime(frames.PreciseEnd, frameRate);
        }
-       
+
        internal void UpdateEndTimeFromFrames () {
                UpdateEndTimeFromFrames(properties.CurrentFrameRate);
        }
-       
+
        internal void ClearTranslation () {
                translation = null;
        }
-       
-       
+
+
        /* Private methods */
-       
+
        private void SetFieldsForDeepClone (SubtitleProperties properties, Times times, Frames frames, 
SubtitleText text, SubtitleText translation, Style style) {
                this.properties = properties;
                this.times = times;
diff --git a/src/SubLib/Core/Domain/SubtitleCollection.cs b/src/SubLib/Core/Domain/SubtitleCollection.cs
index ae45cdd..715952d 100644
--- a/src/SubLib/Core/Domain/SubtitleCollection.cs
+++ b/src/SubLib/Core/Domain/SubtitleCollection.cs
@@ -21,21 +21,21 @@ using System;
 using System.Collections;
 
 namespace SubLib.Core.Domain {
-       
+
 /// <summary>A container that represents all the subtitles.</summary>
 public class SubtitleCollection {
-       private ArrayList subtitles = new ArrayList(); 
+       private ArrayList subtitles = new ArrayList();
 
 
        /* Public properties */
-       
+
        /// <summary>The number of subtitles in the collection.</summary>
        public int Count {
                get { return subtitles.Count; }
        }
 
        /* Indexers */
-       
+
        public Subtitle this [int index] {
                get {
                        try {
@@ -64,7 +64,7 @@ public class SubtitleCollection {
        public IEnumerator GetEnumerator () {
                return subtitles.GetEnumerator();
        }
-       
+
        /// <summary>Returns the subtitle at the specified index.</summary>
        /// <param name="index">The zero-based subtitle's index.</param>
        /// <returns>The subtitle at the specified index, or null in case the index is invalid.</returns>
@@ -74,20 +74,20 @@ public class SubtitleCollection {
                else
                        return null;
        }
-       
+
        /// <summary>Adds a subtitle to the end of the collection.</summary>
        /// <param name="subtitle">The subtitle to add.</param>
        public void Add (Subtitle subtitle){
                subtitles.Add(subtitle);
        }
-       
+
        /// <summary>Adds a subtitle to the collection, inserting it at the specified index.</summary>
        /// <param name="subtitle">The subtitle to add.</param>
        /// <param name="index">The zero-based index at which the subtitle should be inserted.</param>
        public void Add (Subtitle subtitle, int index){
                subtitles.Insert(index, subtitle);
        }
-               
+
        /// <summary>Creates a subtitle based on the subtitle at the specified index and adds it to the
        /// collection, inserting it right before that index.</summary>
        /// <remarks>The newly created subtitle's times will be based on the specified subtitle. Its end
@@ -100,7 +100,7 @@ public class SubtitleCollection {
        public bool AddNewBefore (int index, SubtitleProperties subtitleProperties) {
                return AddNewBefore(index, subtitleProperties, 
(int)(SubtitleConstants.MinTimeBetweenSubtitles*1000));
        }
-       
+
        /// <summary>Creates a subtitle based on the subtitle at the specified index and adds it to the
        /// collection, inserting it right before that index.</summary>
        /// <remarks>The newly created subtitle's times will be based on the specified subtitle. Its duration
@@ -114,7 +114,7 @@ public class SubtitleCollection {
                Subtitle existing = Get(index);
                if (existing == null)
                        return false;
-               
+
                TimeSpan subtitleEnd = existing.Times.Start - TimeSpan.FromMilliseconds(timeBetweenSubtitles);
                if (subtitleEnd < TimeSpan.Zero)
                        subtitleEnd = TimeSpan.FromSeconds(0);
@@ -127,7 +127,7 @@ public class SubtitleCollection {
                Add(subtitle, index);
                return true;
        }
-               
+
        /// <summary>Creates a subtitle based on the subtitle at the specified index and adds it to the
        /// collection, inserting it right after that index.</summary>
        /// <remarks>The newly created subtitle's times will be based on the specified subtitle. Its start
@@ -152,14 +152,14 @@ public class SubtitleCollection {
                Subtitle existing = Get(index);
                if (existing == null)
                        return false;
-               
+
                TimeSpan subtitleStart = existing.Times.End + TimeSpan.FromMilliseconds(timeBetweenSubtitles);
                TimeSpan subtitleEnd = subtitleStart + 
TimeSpan.FromSeconds(SubtitleConstants.AverageSubtitleDuration);
                Subtitle subtitle = new Subtitle(subtitleProperties, subtitleStart, subtitleEnd);
                Add(subtitle, index + 1);
                return true;
        }
-       
+
        /// <summary>Creates a subtitle and adds it to the collection, inserting it at the specified 
index.</summary>
        /// <remarks>The newly created subtitle's start time will be zero and its duration will be
        /// <see cref="SubtitleConstants.MaxSingleLineSubtitleDuration" />.</remarks>
@@ -169,14 +169,14 @@ public class SubtitleCollection {
        public bool AddNewAt (int index, SubtitleProperties subtitleProperties) {
                if ((index < 0) || (index > Count))
                        return false;
-               
+
                TimeSpan subtitleStart = TimeSpan.FromSeconds(0);
                TimeSpan subtitleEnd = TimeSpan.FromSeconds(SubtitleConstants.AverageSubtitleDuration);
                Subtitle subtitle = new Subtitle(subtitleProperties, subtitleStart, subtitleEnd);
                Add(subtitle, index);
                return true;
        }
-       
+
        /// <summary>Creates a subtitle and adds it to the collection, inserting it at the specified index
        /// and with the specified start time.</summary>
        /// <remarks>The newly created subtitle's duration will be
@@ -195,14 +195,14 @@ public class SubtitleCollection {
                Add(subtitle, index);
                return true;
        }
-       
+
        /// <summary>Checks whether a subtitle with the specified index exists in the collection.</summary>
        /// <param name="index">The zero-based index.</param>
        /// <returns>Whether the index is contained within the collection.</returns>
        public bool Contains (int index) {
                return (index >= 0) && (index < Count);
        }
-       
+
        /// <summary>Removes a subtitle from the collection, given its index.</summary>
        /// <param name="index">The zero-based index of the subtitle to be removed.</param>
        public void Remove (int index) {
@@ -219,7 +219,7 @@ public class SubtitleCollection {
 
 
        /* Internal methods */
-       
+
        internal void SetPropertiesForAll (SubtitleProperties properties) {
                foreach (Subtitle subtitle in subtitles)
                        subtitle.Properties = properties;
diff --git a/src/SubLib/Core/Domain/SubtitleConstants.cs b/src/SubLib/Core/Domain/SubtitleConstants.cs
index 0bc0b3d..09c2828 100644
--- a/src/SubLib/Core/Domain/SubtitleConstants.cs
+++ b/src/SubLib/Core/Domain/SubtitleConstants.cs
@@ -25,71 +25,71 @@ public class SubtitleConstants {
        /// <summary>The distance of the subtitles to the sides of the screen, in percent of screen 
dimensions.</summary>
        /// <remarks>The value of this property is 1/12.</remarks>
        public const float DistanceFromBottomFactor = 1/12;
-       
+
        /// <summary>The maximum number of lines that should be allowed.</summary>
        /// <remarks>The value of this property is 2.</remarks>
        public const int MaxLineCount = 2;
-       
+
        /// <summary>The maximum number of characters per line.</summary>
        /// <remarks>The value of this property is 35.</remarks>
        public const int MaxCharactersPerLine = 35;
-       
+
        /// <summary>The maximum number of words per line.</summary>
        /// <remarks>The value of this property is 7.</remarks>
        public const int MaxWordsPerLine = 7;
-       
+
        /// <summary>The lower bound on the average reading speed, in words per minute.</summary>
        /// <remarks>The value of this property is 150.</remarks>
        public const int MinAverageReadingWordsPerMinute = 150;
-       
+
        /// <summary>The upper bound on the average reading speed, in words per minute.</summary>
        /// <remarks>The value of this property is 180.</remarks>
        public const int MaxAverageReadingWordsPerMinute = 180;
-       
+
        /// <summary>The average reading speed, in words per minute.</summary>
        /// <remarks>The value of this property is 150.</remarks>
        public const int AverageReadingWordsPerMinute = 165;
-       
+
        /// <summary>The lower bound on the average reading speed, in words per second.</summary>
 /// <remarks>The value of this property is 2.5.</remarks>
        public const float MinAverageReadingWordsPerSecond = 2.5f;
-       
+
        /// <summary>The upper bound on the average reading speed, in words per second.</summary>
 /// <remarks>The value of this property is 3.</remarks>
        public const float MaxAverageReadingWordsPerSecond = 3;
-       
+
        /// <summary>The average reading speed, in words per second.</summary>
        /// <remarks>The value of this property is 2.75.</remarks>
        public const float AverageReadingWordsPerSecond = 2.75f;
-       
+
        /// <summary>The maximum duration of a full single-line subtitle, in seconds.</summary>
        /// <remarks>The value of this property is 3.5.</remarks>
        public const float MaxSingleLineSubtitleDuration = 3.5f;
-       
+
        /// <summary>The average duration of a subtitle, in seconds.</summary>
        /// <remarks>The value of this property is 1.5.</remarks>
        public const float AverageSubtitleDuration = 1.5f;
-       
+
        /// <summary>The maximum duration of a full two-line subtitle, in seconds.</summary>
        /// <remarks>The value of this property is 6.</remarks>
        public const float MaxTwoLineSubtitleDuration = 6;
-       
+
        /// <summary>The duration of a single-word subtitle, in seconds.</summary>
        /// <remarks>The value of this property is 1.5.</remarks>
        public const float SingleWordSubtitleDuration = 1.5f;
-       
+
        /// <summary>The amount of time the subtitle should appear after the initiation of the utterance, in 
seconds.</summary>
        /// <remarks>The value of this property is 0.25.</remarks>
        public const float LeadingInTime = 0.25f;
-       
+
        /// <summary>The maximum amount of time the subtitle should be left on the screen after the end of 
the utterance, in seconds.</summary>
        /// <remarks>The value of this property is 2.</remarks>
        public const float LaggingOutTime = 2;
-       
+
        /// <summary>The minimum amount of time between two consecutive subtitles, in seconds.</summary>
        /// <remarks>The value of this property is 0.25.</remarks>
        public const float MinTimeBetweenSubtitles = 0.25f;
-       
+
        /// <summary>The maximum number of sentences that should be allowed per subtitle.</summary>
        /// <remarks>The value of this property is 2.</remarks>
        public const int MaxSentencesPerSubtitle = 2;
diff --git a/src/SubLib/Core/Domain/SubtitleHeaders.cs b/src/SubLib/Core/Domain/SubtitleHeaders.cs
index 7b4dbd2..952d2d7 100644
--- a/src/SubLib/Core/Domain/SubtitleHeaders.cs
+++ b/src/SubLib/Core/Domain/SubtitleHeaders.cs
@@ -22,7 +22,7 @@ using System.IO;
 using System.Text;
 
 namespace SubLib.Core.Domain {
-       
+
 /// <summary>Represents the headers of the supported subtitle formats.</summary>
 public class SubtitleHeaders {
 
@@ -32,55 +32,55 @@ public class SubtitleHeaders {
        private SubtitleHeadersSubStationAlphaASS subStationAlphaASS = null;
        private SubtitleHeadersKaraokeLyricsLRC karaokeLyricsLRC = null;
        private SubtitleHeadersKaraokeLyricsVKT karaokeLyricsVKT = null;
-       
+
        /* Headers are initialized only if and when they're accessed */
-       
+
        /// <summary>The headers for the SubViewer 1.0 subtitle type.</summary>
        public SubtitleHeadersSubViewer1 SubViewer1 {
                get {
                        if (subViewer1 == null)
                                subViewer1 = new SubtitleHeadersSubViewer1();
-                       
+
                        return subViewer1;
                }
        }
-       
+
        /// <summary>The headers for the SubViewer 2.0 subtitle type.</summary>
        public SubtitleHeadersSubViewer2 SubViewer2 {
                get {
                        if (subViewer2 == null)
                                subViewer2 = new SubtitleHeadersSubViewer2();
-                       
+
                        return subViewer2;
                }
        }
-       
+
        /// <summary>The headers for the MPSub subtitle type.</summary>
        public SubtitleHeadersMPSub MPSub {
                get {
                        if (mPSub == null)
                                mPSub = new SubtitleHeadersMPSub();
-                       
+
                        return mPSub;
                }
        }
-       
+
        /// <summary>The headers for the Sub Station Alpha and Advanced Sub Station Alpha subtitle 
types.</summary>
        public SubtitleHeadersSubStationAlphaASS SubStationAlphaASS {
                get {
                        if (subStationAlphaASS == null)
                                subStationAlphaASS = new SubtitleHeadersSubStationAlphaASS();
-                       
+
                        return subStationAlphaASS;
                }
        }
-       
+
        /// <summary>The headers for the Karaoke Lyrics LRC subtitle type.</summary>
        public SubtitleHeadersKaraokeLyricsLRC KaraokeLyricsLRC {
                get {
                        if (karaokeLyricsLRC == null)
                                karaokeLyricsLRC = new SubtitleHeadersKaraokeLyricsLRC();
-                       
+
                        return karaokeLyricsLRC;
                }
        }
@@ -90,7 +90,7 @@ public class SubtitleHeaders {
                get {
                        if (karaokeLyricsVKT == null)
                                karaokeLyricsVKT = new SubtitleHeadersKaraokeLyricsVKT();
-                       
+
                        return karaokeLyricsVKT;
                }
        }
@@ -152,11 +152,11 @@ public class SubtitleHeadersSubViewer1 {
                get { return delay; }
                set { delay = value; }
        }
-       
+
        /// <summary>The delay of the subtitles as text.</summary>
        public string DelayAsText {
                get { return delay.ToString(); }
-               set { 
+               set {
                        try {
                                delay = Convert.ToInt32(value);
                        }
@@ -164,17 +164,17 @@ public class SubtitleHeadersSubViewer1 {
                        }
                 }
        }
-               
+
        /// <summary>The CD track of the subtitles.</summary>
        public int CDTrack {
                get { return cdTrack; }
                set { cdTrack = value; }
        }
-       
+
        /// <summary>The CD track of the subtitles as text.</summary>
        public string CDTrackAsText {
                get { return cdTrack.ToString(); }
-               set { 
+               set {
                        try {
                                cdTrack = Convert.ToInt32(value);
                        }
@@ -223,11 +223,11 @@ public class SubtitleHeadersSubViewer2 : SubtitleHeadersSubViewer1 {
                get { return fontSize; }
                set { fontSize = value; }
        }
-       
+
        /// <summary>The subtitles' font size as text.</summary>
        public string FontSizeAsText {
                get { return fontSize.ToString(); }
-               set { 
+               set {
                        try {
                                fontSize = Convert.ToInt32(value);
                        }
@@ -235,13 +235,13 @@ public class SubtitleHeadersSubViewer2 : SubtitleHeadersSubViewer1 {
                        }
                 }
        }
-       
+
        /// <summary>The subtitles' font name.</summary>
        public string FontName {
                get { return fontName; }
                set { fontName = value; }
        }
-       
+
        public override string ToString() {
                return "\t** SubViewer 2.0 Headers **\n" +
                        "Base " + base.ToString() + "\n" +
@@ -256,26 +256,26 @@ public class SubtitleHeadersMPSub {
        private string author = String.Empty;
        private string mediaType = "VIDEO";
        private string note = String.Empty;
-       
-       
+
+
        /// <summary>The movie's title.</summary>
        public string Title {
                get { return title; }
                set { title = value; }
        }
-       
+
        /// <summary>The File properties, in the format 'size,md5'.</summary>
        public string File {
                get { return file; }
                set { file = value; }
        }
-       
+
        /// <summary>The subtitles' author.</summary>
        public string Author {
                get { return author; }
                set { author = value; }
        }
-       
+
        /// <summary>The Media Type of the subtitles, which can be 'VIDEO' or 'AUDIO'.</summary>
        /// <remarks>This property is only set if the value is 'VIDEO' or 'AUDIO'. It's case 
insensitive.</remarks>
        public string MediaType {
@@ -286,13 +286,13 @@ public class SubtitleHeadersMPSub {
                                mediaType = type;
                }
        }
-       
+
        /// <summary>A note on the subtitles.</summary>
        public string Note {
                get { return note; }
                set { note = value; }
        }
-       
+
        public override string ToString() {
                return "\t** MPSub Headers **\n" +
                        "Title: " + title + ", File: " + file + ", Author: " + author + ", MediaType: " + 
mediaType + ", Note: " + note;
@@ -320,59 +320,59 @@ public class SubtitleHeadersSubStationAlphaASS {
                get { return title; }
                set { title = value; }
        }
-       
+
        /// <summary>The Original Script of the subtitles.</summary>
        public string OriginalScript {
                get { return originalScript; }
                set { originalScript = value; }
        }
-       
+
        /// <summary>The Original Translation of the subtitles.</summary>
        public string OriginalTranslation {
                get { return originalTranslation; }
                set { originalTranslation = value; }
        }
-       
+
        /// <summary>The Original Editing of the subtitles.</summary>
        public string OriginalEditing {
                get { return originalEditing; }
                set { originalEditing = value; }
        }
-       
+
        /// <summary>The Original Timing of the subtitles.</summary>
        public string OriginalTiming {
                get { return originalTiming; }
                set { originalTiming = value; }
        }
-       
+
        /// <summary>The Original Script Checking of the subtitles.</summary>
        public string OriginalScriptChecking {
                get { return originalScriptChecking; }
                set { originalScriptChecking = value; }
        }
-       
+
        /// <summary>The Script Updated By of the subtitles.</summary>
        public string ScriptUpdatedBy {
                get { return scriptUpdatedBy; }
                set { scriptUpdatedBy = value; }
        }
-       
+
        /// <summary>The Collisions of the subtitles.</summary>
        public string Collisions {
                get { return collisions; }
                set { collisions = value; }
        }
-       
+
        /// <summary>The PlayResX of the subtitles.</summary>
        public int PlayResX {
                get { return playResX; }
                set { playResX = value; }
        }
-       
+
        /// <summary>The PlayResX of the subtitles as text.</summary>
        public string PlayResXAsText {
                get { return playResX.ToString(); }
-               set { 
+               set {
                        try {
                                playResX = Convert.ToInt32(value);
                        }
@@ -380,17 +380,17 @@ public class SubtitleHeadersSubStationAlphaASS {
                        }
                 }
        }
-       
+
        /// <summary>The PlayResY of the subtitles.</summary>
        public int PlayResY {
                get { return playResY; }
                set { playResY = value; }
        }
-       
+
        /// <summary>The PlayResY of the subtitles as text.</summary>
        public string PlayResYAsText {
                get { return playResY.ToString(); }
-               set { 
+               set {
                        try {
                                playResY = Convert.ToInt32(value);
                        }
@@ -398,13 +398,13 @@ public class SubtitleHeadersSubStationAlphaASS {
                        }
                 }
        }
-       
+
        /// <summary>The PlayDepth of the subtitles.</summary>
        public int PlayDepth {
                get { return playDepth; }
                set { playDepth = value; }
        }
-       
+
        /// <summary>The PlayResY of the subtitles as text.</summary>
        public string PlayDepthAsText {
                get { return playDepth.ToString(); }
@@ -416,7 +416,7 @@ public class SubtitleHeadersSubStationAlphaASS {
                        }
                 }
        }
-       
+
        /// <summary>The Timer of the subtitles.</summary>
        public string Timer {
                get { return timer; }
@@ -467,7 +467,7 @@ public class SubtitleHeadersKaraokeLyricsLRC {
                get { return album; }
                set { album = value; }
        }
-       
+
        /// <summary>The subtitles' file maker.</summary>
        public string Maker {
                get { return maker; }
@@ -479,16 +479,16 @@ public class SubtitleHeadersKaraokeLyricsLRC {
                get { return version; }
                set { version = value; }
        }
-       
+
        /// <summary>The name of the subtitles' program.</summary>
        public string Program {
                get { return program; }
                set { program = value; }
        }
-       
+
        public override string ToString() {
                return "\t** Karaoke Lyrics LRC Headers **\n" +
-                       "Title: " + title + ", Author: " + author + ", Artist: " + artist + 
+                       "Title: " + title + ", Author: " + author + ", Artist: " + artist +
                        ", Maker: " + maker + ", Version: " + version + ", Program: " + program;
        }
 
@@ -512,7 +512,7 @@ public class SubtitleHeadersKaraokeLyricsVKT {
                get { return frameRate; }
                set { frameRate = value; }
        }
-       
+
        /// <summary>The video file path.</summary>
        public string Source {
                get { return source; }
@@ -524,10 +524,10 @@ public class SubtitleHeadersKaraokeLyricsVKT {
                get { return date; }
                set { date = value; }
        }
-       
+
        public override string ToString() {
                return "\t** Karaoke Lyrics VKT Headers **\n" +
-                       "Author: " + author + ", FrameRate: " + frameRate + 
+                       "Author: " + author + ", FrameRate: " + frameRate +
                        ", Source: " + source + ", Date: " + date;
        }
 
diff --git a/src/SubLib/Core/Domain/SubtitleProperties.cs b/src/SubLib/Core/Domain/SubtitleProperties.cs
index d63cf07..693bc1b 100644
--- a/src/SubLib/Core/Domain/SubtitleProperties.cs
+++ b/src/SubLib/Core/Domain/SubtitleProperties.cs
@@ -23,78 +23,78 @@ using System.IO;
 using System.Text;
 
 namespace SubLib.Core.Domain {
-       
+
 /// <summary>Represents the properties of subtitles.</summary>
-/// <remarks>This class acts as a container which allows you to get and set a 
+/// <remarks>This class acts as a container which allows you to get and set a
 /// variety of properties. Some of these properties are used in syncronization
 /// and timing calculations.</remarks>
 public class SubtitleProperties : ICloneable {
        private Headers headers = new Headers();
-       
+
        private float originalFrameRate = 25;
        private float currentFrameRate = 25;
 
-       
+
        public SubtitleProperties () {
        }
-       
+
        public SubtitleProperties (Headers headers, float originalFrameRate, float currentFrameRate) {
                this.headers = headers;
                this.originalFrameRate = originalFrameRate;
                this.currentFrameRate = currentFrameRate;
        }
-       
+
        /// <summary>Initializes a new instance of the <see cref="SubtitleProperties" />
        /// class, with defaults for all properties.</summary>
        internal SubtitleProperties (ParsingProperties properties) {
                headers = properties.Headers;
                originalFrameRate = properties.InputFrameRate;
        }
-       
-       
+
+
        /* Public properties */
-       
+
        /// <summary>The headers used in some subtitle formats.</summary>
        public Headers Headers {
                get { return headers; }
        }
-               
+
        /// <summary>The frame rate originally applied to the subtitles.</summary>
        /// <remarks>When converting between frame rates, this is the frame rate of the subtitles
        /// when they are opened. This is sometimes refered to as the input frame rate.</remarks>
        public float OriginalFrameRate {
                get { return originalFrameRate; }
        }
-       
+
        /// <summary>The frame rate currently being used in the subtitles.</summary>
        /// <remarks>When converting between frame rates, this is the target frame rate of the
        /// subtitles. This is sometimes refered to as the output frame rate.</remarks>
        public float CurrentFrameRate {
                get { return currentFrameRate; }
        }
-       
-       
+
+
        /* Public methods */
-       
+
        public override string ToString () {
                return "Original FPS = " + originalFrameRate + ", Current FPS = " + currentFrameRate + "\n" + 
headers.ToString();
        }
-       
+
        public object Clone() {
                return new SubtitleProperties(this.Headers.Clone() as Headers, this.OriginalFrameRate, 
this.CurrentFrameRate);
        }
-       
-       
+
+
        /* Internal members */
-       
+
        internal void SetCurrentFrameRate (float frameRate) {
                currentFrameRate = frameRate;
        }
-       
+
        internal void SetOriginalFrameRate (float frameRate) {
                originalFrameRate = frameRate;
        }
-       
+
 }
 
 }
diff --git a/src/SubLib/Core/Domain/SubtitleText.cs b/src/SubLib/Core/Domain/SubtitleText.cs
index a3e9c97..6000f31 100644
--- a/src/SubLib/Core/Domain/SubtitleText.cs
+++ b/src/SubLib/Core/Domain/SubtitleText.cs
@@ -25,7 +25,7 @@ using System.Text.RegularExpressions;
 namespace SubLib.Core.Domain {
 
 //TODO this can be optimized
-/// <summary>Represents the text of a subtitle.</summary>      
+/// <summary>Represents the text of a subtitle.</summary>
 public class SubtitleText : ICloneable {
        private ArrayList lines = new ArrayList();
 
@@ -37,33 +37,33 @@ public class SubtitleText : ICloneable {
        public SubtitleText (string text, string lineBreak, bool toTrimLines) {
                Set(text, lineBreak, toTrimLines);
        }
-       
+
        /// <summary>Initializes a new instance of the <see cref="SubtitleText" /> class
        /// with the specified text.</summary>
        /// <remarks>Newline (\n) is used as the line break. The text lines are not trimmed.</remarks>
        /// <param name="text">The subtitle text.</param>
        public SubtitleText (string text) : this(text, "\n", false) {
        }
-       
+
        /// <summary>Initializes a new instance of the <see cref="SubtitleText" /> class, with empty 
text.</summary>
        public SubtitleText() {
        }
-       
-       
+
+
        /* Public properties */
-       
+
        /// <summary>Whether there is no text.</summary>
        public bool IsEmpty {
                get { return ((lines.Count == 0) || ((lines.Count == 1) && ((lines[0] as string).Length == 
0))); }
        }
-               
+
        public IEnumerator GetEnumerator () {
                return lines.GetEnumerator();
        }
 
-       
+
        /* Public methods */
-       
+
        public void Clear () {
                lines.Clear();
        }
@@ -91,14 +91,14 @@ public class SubtitleText : ICloneable {
                }
                return text;
        }
-       
+
        /// <summary>Gets the subtitle text.</summary>
        /// <remarks>The text lines end with the new line (\n) char.</remarks>
        /// <returns>The subtitle text.</returns>
        public string Get () {
                return Get("\n");
        }
-       
+
        /// <summary>Gets the text lines merged with the specified line break and replaces those that are 
empty.</summary>
        /// <param name="replacement">The text to replace empty lines with.</param>
        /// <param name="lineBreak">The line break used to merge the text.</param>
@@ -107,7 +107,7 @@ public class SubtitleText : ICloneable {
        public string GetReplaceEmptyLines (string replacement, string lineBreak) {
                if (this.IsEmpty)
                        return replacement;
-       
+
                string text = String.Empty;
                IEnumerator textLines = lines.GetEnumerator();
                if (textLines.MoveNext()){
@@ -120,7 +120,7 @@ public class SubtitleText : ICloneable {
                }
                return text;
        }
-       
+
        /// <summary>Gets the text lines and replaces those that are empty.</summary>
        /// <param name="replacement">The text to replace empty lines with.</param>
        /// <remarks>The text lines are merged by the newline (\n) char. A subtitle line is considered empty
@@ -129,7 +129,7 @@ public class SubtitleText : ICloneable {
        public string GetReplaceEmptyLines (string replacement) {
                return GetReplaceEmptyLines(replacement, "\n");
        }
-       
+
        /// <summary>Gets and trims the text lines merged with the specified line break.</summary>
        /// <param name="lineBreak">The line break used to merge the text.</param>
        /// <remarks>A subtitle line is considered blank if it has only white spaces.</remarks>
@@ -152,7 +152,7 @@ public class SubtitleText : ICloneable {
                }
                return text;
        }
-       
+
        /// <summary>Gets and trims the text lines.</summary>
        /// <remarks>The text lines are merged by the newline (\n) char. A subtitle line is
        /// considered blank ifit has only white spaces.</remarks>
@@ -160,11 +160,11 @@ public class SubtitleText : ICloneable {
        public string GetTrimLines () {
                return GetTrimLines("\n");
        }
-       
+
        public string[] GetLines () {
                return (string[])lines.ToArray(typeof(String));
        }
-       
+
        /// <summary>Sets the subtitle text using the specified line break and trimming option.</summary>
        /// <param name="text">The subtitle text.</param>
        /// <param name="lineBreak">The text substring used to split the text in lines.</param>
@@ -181,19 +181,19 @@ public class SubtitleText : ICloneable {
                foreach (string textLine in textLines)
                        lines.Add(textLine);
        }
-       
+
        /// <summary>Sets the subtitle text.</summary>
        /// <remarks>Newline (\n) is used as the line break. The text lines are not trimmed.</remarks>
        /// <param name="text">The subtitle text.</param>
        public void Set (string text) {
                Set(text, "\n", false);
        }
-       
+
        public void Set (string[] newLines) {
                Clear();
                Add(newLines);
        }
-       
+
        public void Add (string[] newLines) {
                foreach (string newLine in newLines) {
                        string trimmedLine = newLine.Trim();
@@ -201,7 +201,7 @@ public class SubtitleText : ICloneable {
                                lines.Add(trimmedLine);
                }
        }
-       
+
        public override string ToString() {
                string result = String.Empty;
                int lineNumber = 1;
@@ -211,7 +211,7 @@ public class SubtitleText : ICloneable {
                }
                return result;
        }
-       
+
        public object Clone() {
                SubtitleText clone = new SubtitleText();
                foreach (string line in lines) {
@@ -222,7 +222,7 @@ public class SubtitleText : ICloneable {
 
 
        /* Private Methods */
-       
+
        private string ReplaceLineIfEmpty (string textLine, string replacement) {
                if (textLine == String.Empty)
                        return replacement;
diff --git a/src/SubLib/Core/Domain/SubtitleTypeInfo.cs b/src/SubLib/Core/Domain/SubtitleTypeInfo.cs
index 434d51b..8abbee4 100644
--- a/src/SubLib/Core/Domain/SubtitleTypeInfo.cs
+++ b/src/SubLib/Core/Domain/SubtitleTypeInfo.cs
@@ -41,38 +41,38 @@ public class SubtitleTypeInfo : IComparable {
                this.mode = mode;
                this.extensions = extensions;
        }
-       
+
        /// <summary>The name of the subtitle type.</summary>
        public string Name {
                get { return name; }
        }
-       
+
        /// <summary>The subtitle type.</summary>
        public SubtitleType Type {
                get { return type; }
        }
-       
+
        /// <summary>The subtitle mode.</summary>
        public SubtitleMode Mode {
                get { return mode; }
        }
-       
+
        /// <summary>The extensions the subtitle type uses.</summary>
        public string[] Extensions {
                get { return extensions; }
        }
-       
+
        /// <summary>A comma-separated list of the extensions the subtitle type uses.
        /// The prefix "*." is added to every extension.</summary>
        public string ExtensionsAsText {
                get { return ExtensionsToText(); }
        }
-       
+
        /// <summary>The preferred extension, which is the first on the list.</summary>
        public string PreferredExtension {
                get { return extensions[0]; }
        }
-       
+
        /// <summary>Checks whether the specified extension is one of the extensions of the <see 
cref="SubtitleType" /></summary>
        /// <param name="extension">The extension to search for.</param>
        /// <returns>True if the extension was found, False otherwise.</returns>
@@ -83,7 +83,7 @@ public class SubtitleTypeInfo : IComparable {
                }
                return false;
        }
-       
+
        /// <summary>Compares this instance with a specified object, based on the object names.
        /// See <see cref="String.CompareTo(object)" /> for more information.</summary>
        /// <param name="obj">The object to compare this class to.</param>
@@ -101,23 +101,23 @@ public class SubtitleTypeInfo : IComparable {
        }
 
        /* Internal members */
-       
+
        internal SubtitleTypeInfo (SubtitleFormat format) : this(format.Name, format.Type, format.Mode, 
format.Extensions) {
        }
 
        /* Private members */
-       
+
        private string ExtensionsToText () {
                if (extensions == null)
                        return String.Empty;
-                       
+
                string text = ExtensionToText(extensions[0]);
                for (int count = 1 ; count < extensions.Length ; count++)
                        text += ", " + ExtensionToText(extensions[count]);
-                       
-               return text;            
+
+               return text;
        }
-       
+
        private string ExtensionToText (string extension) {
                return "*." + extension;
        }
diff --git a/src/SubLib/Core/Domain/Subtitles.cs b/src/SubLib/Core/Domain/Subtitles.cs
index e4f587d..9c4d770 100644
--- a/src/SubLib/Core/Domain/Subtitles.cs
+++ b/src/SubLib/Core/Domain/Subtitles.cs
@@ -38,19 +38,19 @@ public class Subtitles : ICloneable {
 
 
        /* Public properties */
-       
+
        /// <summary>A collection which contains the subtitles.</summary>
        public SubtitleCollection Collection {
                get { return collection; }
                set { collection = value; }
        }
-       
+
        /// <summary>The properties of the subtitles.</summary>
        public SubtitleProperties Properties {
                get { return properties; }
                set { properties = value; }
        }
-       
+
        /// <summary>Information about the available subtitle types.</summary>
        public static SubtitleTypeInfo[] AvailableTypes {
                get {
@@ -74,13 +74,13 @@ public class Subtitles : ICloneable {
                                Array.Sort(types);
                                availableTypesSorted = types;
                        }
-                       return availableTypesSorted;    
+                       return availableTypesSorted;
                }
        }
 
 
        /* Public methods */
-       
+
        /// <summary>Get information about an available subtitle type.</summary>
        /// <param name="type">The subtitle type.</param>
        /// <returns>The information about the specified subtitle type.</returns>
@@ -97,7 +97,7 @@ public class Subtitles : ICloneable {
                }
                return false;
        }
-       
+
        public override string ToString(){
                return Collection.ToString() + "\n-------------------------------------------\n" + 
Properties.ToString();
        }
@@ -124,7 +124,7 @@ public class Subtitles : ICloneable {
                        subtitle.UpdateFramesFromTimes(frameRate);
                }
        }
-       
+
        internal void UpdateTimesFromFrames (float frameRate) {
                foreach (Subtitle subtitle in collection) {
                        subtitle.UpdateTimesFromFrames(frameRate);
@@ -136,9 +136,9 @@ public class Subtitles : ICloneable {
                if (textType == SubtitleTextType.Text)
                        return subtitle.Text;
                else
-                       return subtitle.Translation;    
+                       return subtitle.Translation;
        }
-       
+
 
 }
 
diff --git a/src/SubLib/Core/Domain/SyncPoint.cs b/src/SubLib/Core/Domain/SyncPoint.cs
index 46748ee..48150c0 100644
--- a/src/SubLib/Core/Domain/SyncPoint.cs
+++ b/src/SubLib/Core/Domain/SyncPoint.cs
@@ -25,7 +25,7 @@ public class SyncPoint {
        private int subtitleNumber = 0;
        private Timing current = null;
        private Timing correct = null;
-       
+
        public SyncPoint (int subtitleNumber, Timing current, Timing correct) {
                this.subtitleNumber = subtitleNumber;
                this.current = current;
@@ -37,15 +37,15 @@ public class SyncPoint {
        public int SubtitleNumber {
                get { return subtitleNumber; }
        }
-       
+
        public Timing Current {
                get { return current; }
        }
-       
+
        public Timing Correct {
                get { return correct; }
        }
-       
+
        public int CompareCurrentTo (SyncPoint otherSyncPoint) {
                return current.CompareTo(otherSyncPoint.Current);
        }
diff --git a/src/SubLib/Core/Domain/SyncPoints.cs b/src/SubLib/Core/Domain/SyncPoints.cs
index 005f763..e908cd8 100644
--- a/src/SubLib/Core/Domain/SyncPoints.cs
+++ b/src/SubLib/Core/Domain/SyncPoints.cs
@@ -24,60 +24,60 @@ namespace SubLib.Core.Domain {
 
 public class SyncPoints {
        protected SortedList syncPoints = null;
-       
+
        public SyncPoints () {
                this.syncPoints = new SortedList();
        }
-       
+
        public SyncPoints (SortedList syncPoints) {
                this.syncPoints = syncPoints;
        }
-       
+
        /* Indexers */
-       
+
        public SyncPoint this [int index] {
                get { return syncPoints.GetByIndex(index) as SyncPoint; }
        }
-       
+
        /* Properties */
-       
+
        public int Count {
                get { return syncPoints.Count; }
        }
-       
+
        /* Public methods */
-       
+
        public SyncPoint Get (int index) {
                return syncPoints.GetByIndex(index) as SyncPoint;
        }
-       
+
        public int IndexOf (SyncPoint syncPoint) {
                return syncPoints.IndexOfKey(syncPoint.SubtitleNumber);
        }
-       
+
        public bool Contains (int subtitleNumber) {
                return syncPoints.ContainsKey(subtitleNumber);
        }
-       
+
        public bool Add (SyncPoint syncPoint) {
                bool willReplace = Contains(syncPoint.SubtitleNumber);
                syncPoints[syncPoint.SubtitleNumber] = syncPoint;
                return willReplace;
        }
-       
+
        public void Remove (int index) {
                syncPoints.RemoveAt(index);
        }
-       
+
        public IEnumerator GetEnumerator () {
                return syncPoints.GetEnumerator();
        }
-       
+
        public SyncPoints Clone () {
                return new SyncPoints(syncPoints.Clone() as SortedList);
        }
 
-       
+
 
 }
 
diff --git a/src/SubLib/Core/Domain/Times.cs b/src/SubLib/Core/Domain/Times.cs
index 5ea57aa..e5301fc 100644
--- a/src/SubLib/Core/Domain/Times.cs
+++ b/src/SubLib/Core/Domain/Times.cs
@@ -42,7 +42,7 @@ public class Times {
                        subtitle.UpdateStartFrameFromTimes();
                }
        }
-       
+
        /// <summary>The end time.</summary>
        /// <remarks>Upon setting the end time, the end frame (<see cref="Frames.End">Frames.End</see>) is 
also updated based on
        /// the <see cref="SubtitleProperties.CurrentFrameRate" />.</remarks>
@@ -53,7 +53,7 @@ public class Times {
                        subtitle.UpdateEndFrameFromTimes();
                }
        }
-       
+
        /// <summary>The time duration.</summary>
        /// <remarks>Setting the duration maintains the start time and changes the end time.
        /// Upon setting the duration, the end frame (<see cref="Frames.End">Frames.End</see>) is also 
updated based on
@@ -62,8 +62,8 @@ public class Times {
                get { return End - Start; }
                set { End = Start + value; }
        }
-       
-       
+
+
        /* Public methods */
 
        /// <summary>Shifts the subtitle with a specified time span.</summary>
@@ -78,28 +78,28 @@ public class Times {
                return MemberwiseClone() as Times;
        }
 
-       
+
        public override string ToString() {
                return Start + "->" + End;
        }
-       
+
        public Times Clone (Subtitle subtitleClone) {
                Times clone = this.MemberwiseClone() as Times;
                clone.SetFieldsForDeepClone(subtitleClone);
                return clone;
        }
 
-       
+
        /* Internal members */
 
        internal Times (Subtitle subtitle) {
                this.subtitle = subtitle;
        }
-       
+
        internal Times (Subtitle subtitle, TimeSpan start, TimeSpan end) {
                this.start = start;
                this.end = end;
-               this.subtitle = subtitle;       
+               this.subtitle = subtitle;
        }
 
        /// <remarks>Doesn't update frames.</remarks>
@@ -107,29 +107,29 @@ public class Times {
                get { return start; }
                set { start = value; }
        }
-       
+
        /// <remarks>Doesn't update frames.</remarks>
        internal TimeSpan PreciseEnd {
                get { return end; }
                set { end = value; }
        }
-       
+
        /// <remarks>Doesn't update frames.</remarks>
        internal TimeSpan PreciseDuration {
                get { return end - start; }
                set { end = start + value; }
        }
-       
+
        internal void Scale (double factor, TimeSpan baseTime) {
                PreciseStart = SyncUtil.Scale(PreciseStart, baseTime, factor);
                PreciseEnd = SyncUtil.Scale(PreciseEnd, baseTime, factor);
 
-               subtitle.UpdateFramesFromTimes();       
+               subtitle.UpdateFramesFromTimes();
        }
-       
-       
+
+
        /* Private methods */
-       
+
        private void SetFieldsForDeepClone (Subtitle subtitle) {
                this.subtitle = subtitle;
        }
diff --git a/src/SubLib/Core/Domain/Timing.cs b/src/SubLib/Core/Domain/Timing.cs
index 92d5e9f..ef150ae 100644
--- a/src/SubLib/Core/Domain/Timing.cs
+++ b/src/SubLib/Core/Domain/Timing.cs
@@ -24,24 +24,24 @@ namespace SubLib.Core.Domain {
 public class Timing : IComparable {
        private double frame = 0;
        private TimeSpan time = TimeSpan.Zero;
-       
+
        public Timing (int frame, TimeSpan time) {
                this.frame = frame;
                this.time = time;
        }
-       
+
        public int Frame {
                get { return Convert.ToInt32(frame); }
        }
-       
+
        public TimeSpan Time {
                get { return time; }
        }
-       
+
        public int CompareTo (object obj) {
         if (!(obj is Timing))
                throw new ArgumentException("Object is not of class Timing");
-        
+
         return time.CompareTo((obj as Timing).Time);
     }
 
diff --git a/src/SubLib/Core/MatchEvaluationCounter.cs b/src/SubLib/Core/MatchEvaluationCounter.cs
index 90f4365..7487474 100644
--- a/src/SubLib/Core/MatchEvaluationCounter.cs
+++ b/src/SubLib/Core/MatchEvaluationCounter.cs
@@ -26,20 +26,20 @@ internal class MatchEvaluationCounter {
        int count = 0; //The number of matches or times the evaluator was called
        bool evaluationOccured = false; //Whether an evaluation occured
        string replacement = String.Empty;
-       
+
        internal MatchEvaluationCounter (string replacement) {
                this.replacement = replacement;
        }
-       
+
        internal int Count {
                get { return count; }
        }
-       
+
        internal bool EvaluationOccured {
                get { return evaluationOccured; }
                set { evaluationOccured = value; }
        }
-       
+
        internal string Evaluator (Match match) {
                count++;
                evaluationOccured = true;
diff --git a/src/SubLib/Core/Search/SearchOperator.cs b/src/SubLib/Core/Search/SearchOperator.cs
index 5c7c7dd..e5c914e 100644
--- a/src/SubLib/Core/Search/SearchOperator.cs
+++ b/src/SubLib/Core/Search/SearchOperator.cs
@@ -27,14 +27,14 @@ namespace SubLib.Core.Search {
 /// <summary>Performs search operations.</summary>
 public class SearchOperator {
        private Subtitles subtitles = null;
-       
+
        public SearchOperator (Subtitles subtitles) {
                this.subtitles = subtitles;
        }
 
        /* Public members */
-       
-       
+
+
        /// <summary>Searches for text using the specified search options.</summary>
        /// <param name="options">The search options.</param>
        /// <returns>The search results, or null in case no results were found.</returns>
@@ -42,7 +42,7 @@ public class SearchOperator {
                if (options.Backwards)
                        return FindBackward(options);
                else
-                       return FindForward(options);    
+                       return FindForward(options);
        }
 
        /// <summary>Replaces all occurences of some text with the specified replacement.</summary>
@@ -92,29 +92,29 @@ public class SearchOperator {
 
                return replaced;
        }
-       
+
        /// <summary>Finds the subtitle that contains the specified time position.</summary>
        /// <param name="time">The time position, in seconds.</param>
        /// <returns>The found subtitle number, or -1 if no subtitle was found.</returns>
        public int FindWithTime (float time) {
                SubtitleCollection collection = subtitles.Collection;
-       
+
                if (collection.Count == 0)
                        return -1;
-               
+
                for (int subtitleNumber = 0 ; subtitleNumber < collection.Count ; subtitleNumber++) {
                        Subtitle subtitle = collection[subtitleNumber];
                        double start = subtitle.Times.Start.TotalSeconds;
                        if (time < start)
                                continue;
-                       
+
                        double end = subtitle.Times.End.TotalSeconds;
                        if (time <= end)
                                return subtitleNumber; //TODO optimize: else return -1;
                }
-               return -1; // No subtitles were found 
+               return -1; // No subtitles were found
        }
-               
+
        /// <summary>Finds the subtitle more near of specified time position.</summary>
        /// <param name="time">The time position, in seconds.</param>
        /// <returns>The found subtitle number, or -1 if no subtitle was found.</returns>
@@ -130,17 +130,17 @@ public class SearchOperator {
                /* Iterate subtitles two by two - the last subtitle is handled in pair and individually 
afterwards */
                for (int subtitleNumber = 0 ; subtitleNumber < collection.Count - 1 ; subtitleNumber++) {
                        Subtitle subtitle = collection[subtitleNumber];
-                       
+
                        /* Continue iterating if didn't reach subtitle start yet */
                        double start = subtitle.Times.Start.TotalSeconds;
                        if (time < start)
                                continue;
-                       
+
                        /* Check if time is contained by the subtitle */
                        double end = subtitle.Times.End.TotalSeconds;
                        if (time <= end)
                                return subtitleNumber;
-                               
+
                        /* Check if contained between this and the next subtitle, and which is nearest */
                        int nextSubtitleIndex = subtitleNumber + 1;
                        Subtitle nextSubtitle = collection[nextSubtitleIndex];
@@ -148,23 +148,23 @@ public class SearchOperator {
                        if (time < nextSubtitleStart)
                                return ((time - end) < (nextSubtitleStart - time)) ? subtitleNumber : 
nextSubtitleIndex;
                }
-               
+
                /* If no rule matched before, time must be after last subtitle */
                return collection.Count - 1;
        }
-       
+
        /* Private members */
-       
-       
+
+
        /// <summary>Searches forward for text using the specified search options.</summary>
        /// <param name="options">The search options.</param>
        /// <returns>The search results, or null in case no results were found.</returns>
        private SubtitleSearchResults FindForward (SubtitleSearchOptions options) {
                SubtitleCollection collection = subtitles.Collection;
-       
+
                if (collection.Count == 0)
                        return null;
-               
+
                /* Search the startSubtitle subtitle starting at the startIndex */
                SubtitleSearchResults results = FindInSubtitleFromIndex(options.StartSubtitle, 
options.LineBreak, options.Regex, options.StartIndex, options.TextType, options.Backwards);
                if (results != null)
@@ -176,7 +176,7 @@ public class SearchOperator {
                        if (results != null)
                                return results;
                }
-               
+
                if (options.Wrap) {
                        /* Iterate from the beginning back to the subtitle */
                        for (int subtitleNumber = 0 ; subtitleNumber < options.StartSubtitle ; 
subtitleNumber++) {
@@ -189,32 +189,32 @@ public class SearchOperator {
                        if (results != null)
                                return results;
                }
-               
+
                /* Text not found */
                return null;
        }
-       
+
        /// <summary>Searches backward for text using the specified search options.</summary>
        /// <param name="options">The search options.</param>
        /// <returns>The search results, or null in case no results were found.</returns>
        private SubtitleSearchResults FindBackward (SubtitleSearchOptions options) {
                SubtitleCollection collection = subtitles.Collection;
-       
+
                if (collection.Count == 0)
                        return null;
-               
+
                /* Search the subtitle starting at the startIndex */
                SubtitleSearchResults results = FindInSubtitleFromIndex(options.StartSubtitle, 
options.LineBreak, options.Regex, options.StartIndex, options.TextType, options.Backwards);
                if (results != null)
                        return results;
-               
+
                /* Iterate through the start of the collection */
                for (int subtitleNumber = options.StartSubtitle - 1 ; subtitleNumber > 0 ; subtitleNumber--) {
                        results = FindInSubtitle(subtitleNumber, options.LineBreak, options.Regex, 
options.Backwards);
                        if (results != null)
                                return results;
                }
-               
+
                if (options.Wrap) {
                        /* Iterate from the end back to the subtitle */
                        for (int subtitleNumber = collection.Count - 1 ; subtitleNumber > 
options.StartSubtitle ; subtitleNumber--) {
@@ -227,11 +227,11 @@ public class SearchOperator {
                        if (results != null)
                                return results;
                }
-               
+
                /* Text not found */
                return null;
        }
-       
+
        /// <returns>The <see cref="SubtitleSearchResults" />, or null if the text was not found.</returns>
        private SubtitleSearchResults FindInSubtitle (int subtitleNumber, string lineBreak, Regex regex, bool 
backwards) {
                if (backwards) {
@@ -239,7 +239,7 @@ public class SearchOperator {
                        SubtitleSearchResults results = FindInTextContent(subtitleNumber, lineBreak, regex, 
SubtitleTextType.Translation);
                        if (results != null)
                                return results;
-                       
+
                        /* Not found in the translation, finding in the text */
                        return FindInTextContent(subtitleNumber, lineBreak, regex, SubtitleTextType.Text);
                }
@@ -248,12 +248,12 @@ public class SearchOperator {
                        SubtitleSearchResults results = FindInTextContent(subtitleNumber, lineBreak, regex, 
SubtitleTextType.Text);
                        if (results != null)
                                return results;
-                       
+
                        /* Not found in the text, finding in the translation */
                        return FindInTextContent(subtitleNumber, lineBreak, regex, 
SubtitleTextType.Translation);
                }
        }
-       
+
        /// <returns>The <see cref="SubtitleSearchResults" />, or null if the text was not found.</returns>
        private SubtitleSearchResults FindInSubtitleFromIndex (int subtitleNumber, string lineBreak, Regex 
regex, int startIndex, SubtitleTextType textType, bool backwards) {
                if (backwards) {
@@ -266,7 +266,7 @@ public class SearchOperator {
                                SubtitleSearchResults results = FindInTextContentFromIndex(subtitleNumber, 
lineBreak, regex, startIndex, SubtitleTextType.Translation);
                                if (results != null)
                                        return results;
-                               
+
                                /* Not found in the translation, finding in the text */
                                return FindInTextContent(subtitleNumber, lineBreak, regex, 
SubtitleTextType.Text);
                        }
@@ -277,7 +277,7 @@ public class SearchOperator {
                                SubtitleSearchResults results = FindInTextContentFromIndex(subtitleNumber, 
lineBreak, regex, startIndex, SubtitleTextType.Text);
                                if (results != null)
                                        return results;
-                               
+
                                /* Not found in the text, finding in the translation */
                                return FindInTextContent(subtitleNumber, lineBreak, regex, 
SubtitleTextType.Translation);
                        }
@@ -287,7 +287,7 @@ public class SearchOperator {
                        }
                }
        }
-               
+
        /// <returns>The <see cref="SubtitleSearchResults" />, or null if the text was not found.</returns>
        private SubtitleSearchResults FindInSubtitleTillIndex (int subtitleNumber, string lineBreak, Regex 
regex, int endIndex, SubtitleTextType textType, bool backwards) {
                if (backwards) {
@@ -296,7 +296,7 @@ public class SearchOperator {
                                SubtitleSearchResults results = FindInTextContent(subtitleNumber, lineBreak, 
regex, SubtitleTextType.Translation);
                                if (results != null)
                                        return results;
-                               
+
                                /* Not found in the text, finding in the text till the specified index */
                                return FindInTextContentTillIndex(subtitleNumber, lineBreak, regex, endIndex, 
SubtitleTextType.Text, backwards);
                        }
@@ -315,23 +315,23 @@ public class SearchOperator {
                                SubtitleSearchResults results = FindInTextContent(subtitleNumber, lineBreak, 
regex, SubtitleTextType.Text);
                                if (results != null)
                                        return results;
-                               
+
                                /* Not found in the text, finding in the translation till the specified index 
*/
                                return FindInTextContentTillIndex(subtitleNumber, lineBreak, regex, endIndex, 
SubtitleTextType.Translation, backwards);
                        }
                }
        }
-       
+
        private SubtitleSearchResults FindInTextContent (int subtitleNumber, string lineBreak, Regex regex, 
SubtitleTextType textType) {
                SubtitleText text = subtitles.GetSubtitleText(subtitleNumber, textType);
                return MatchValues(regex.Match(text.Get(lineBreak)), subtitleNumber, textType, 0);
        }
-       
+
        private SubtitleSearchResults FindInTextContentFromIndex (int subtitleNumber, string lineBreak, Regex 
regex, int startIndex, SubtitleTextType textType) {
                SubtitleText text = subtitles.GetSubtitleText(subtitleNumber, textType);
                return MatchValues(regex.Match(text.Get(lineBreak), startIndex), subtitleNumber, textType, 0);
        }
-       
+
        private SubtitleSearchResults FindInTextContentTillIndex (int subtitleNumber, string lineBreak, Regex 
regex, int endIndex, SubtitleTextType textType, bool backwards) {
                SubtitleText text = subtitles.GetSubtitleText(subtitleNumber, textType);
                string subtitleText = text.Get(lineBreak);
@@ -345,7 +345,7 @@ public class SearchOperator {
                        return MatchValues(regex.Match(subtitleTextSubstring), subtitleNumber, textType, 0);
                }
        }
-       
+
        private SubtitleSearchResults MatchValues (Match match, int subtitleNumber, SubtitleTextType 
textType, int charsBeforeMatchInput) {
                if (match.Success) {
                        return new SubtitleSearchResults(subtitleNumber, textType, match.Index + 
charsBeforeMatchInput, match.Length);
@@ -359,8 +359,8 @@ public class SearchOperator {
                string newText = regex.Replace(text, counter.Evaluator);
                return (counter.EvaluationOccured ? newText : null);
        }
-       
-       
+
+
 }
 
 }
diff --git a/src/SubLib/Core/Search/SubtitleReplaceResult.cs b/src/SubLib/Core/Search/SubtitleReplaceResult.cs
index 55654bf..8386134 100644
--- a/src/SubLib/Core/Search/SubtitleReplaceResult.cs
+++ b/src/SubLib/Core/Search/SubtitleReplaceResult.cs
@@ -32,7 +32,7 @@ public class SubtitleReplaceResult {
                this.text = text;
                this.translation = translation;
        }
-       
+
        /* Public properties */
 
        public int Number {
diff --git a/src/SubLib/Core/Search/SubtitleSearchOptions.cs b/src/SubLib/Core/Search/SubtitleSearchOptions.cs
index cb01dbb..131f0e6 100644
--- a/src/SubLib/Core/Search/SubtitleSearchOptions.cs
+++ b/src/SubLib/Core/Search/SubtitleSearchOptions.cs
@@ -66,44 +66,44 @@ public class SubtitleSearchOptions {
        public SubtitleSearchOptions (Regex regex, SubtitleTextType textType, int startSubtitle, int 
startIndex, bool wrap, bool backwards)
                : this(regex, textType, "\n", startSubtitle, startIndex, wrap, backwards) {
        }
-       
+
        /* Public properties */
-       
+
        /// <summary>The regular expression.</summary>
        public Regex Regex {
                get { return regex; }
        }
-       
+
        /// <summary>The linebreak used to use between multiple lines of text.</summary>
        public string LineBreak {
                get { return lineBreak; }
        }
-       
+
        /// <summary>The type of text content to start the search with.</summary>
        public SubtitleTextType TextType {
                get { return textType; }
        }
-       
+
        /// <summary>The subtitle to start the search with.</summary>
        public int StartSubtitle {
                get { return startSubtitle; }
        }
-       
+
        /// <summary>The index of the text to start the search with.</summary>
        public int StartIndex {
                get { return startIndex; }
        }
-       
+
        /// <summary>Whether to continue the search from the beginning when it reaches the end of the 
subtitles.</summary>
        public bool Wrap {
                get { return wrap; }
        }
-       
+
        /// <summary>Whether to search backwards.</summary>
        public bool Backwards {
                get { return backwards; }
        }
-               
+
 }
 
 }
diff --git a/src/SubLib/Core/Search/SubtitleSearchResults.cs b/src/SubLib/Core/Search/SubtitleSearchResults.cs
index debb178..03af931 100644
--- a/src/SubLib/Core/Search/SubtitleSearchResults.cs
+++ b/src/SubLib/Core/Search/SubtitleSearchResults.cs
@@ -40,24 +40,24 @@ public class SubtitleSearchResults {
                this.index = index;
                this.length = length;
        }
-       
+
        /* Public properties */
-       
+
        /// <summary>The subtitle number.</summary>
        public int Subtitle {
                get { return subtitle; }
        }
-       
+
        /// <summary>The type of the text content.</summary>
        public SubtitleTextType TextType {
                get { return textType; }
        }
-       
+
        /// <summary>The text index.</summary>
        public int Index {
                get { return index; }
        }
-       
+
        /// <summary>The text length.</summary>
        public int Length {
                get { return length; }
diff --git a/src/SubLib/Core/SubtitleFactory.cs b/src/SubLib/Core/SubtitleFactory.cs
index 0076a59..95ee430 100644
--- a/src/SubLib/Core/SubtitleFactory.cs
+++ b/src/SubLib/Core/SubtitleFactory.cs
@@ -34,30 +34,30 @@ namespace SubLib.Core {
 public class SubtitleFactory {
        private IncompleteSubtitleCollection incompleteSubtitles = null;
        private FileProperties fileProperties = null;
-       
+
        private bool includeIncompleteSubtitles = false;
-       
-       private Encoding encoding = null; //The encoding to be used to open a file 
+
+       private Encoding encoding = null; //The encoding to be used to open a file
        private Encoding fallbackEncoding = Encoding.GetEncoding(1252); //The encoding to fall back to when 
no encoding is detected
        private float inputFrameRate = 25; //The frame rate to be used to open a frame-based file
        private int maxFileSize = 1000000; //The size limit for a subtitle file, in bytes
-       
+
        private SubtitleType subtitleType = SubtitleType.Unknown;
-       
-       
+
+
        /* Public properties */
-       
+
        /// <summary>The incomplete subtitles that were found when opening a file.</summary>
        /// <remarks>This is only used when <see cref="IncludeIncompleteSubtitles" /> is set.</remarks>
        public IncompleteSubtitleCollection IncompleteSubtitles {
                 get { return incompleteSubtitles; }
        }
-       
+
        /// <summary>The properties of an opened file, after opening.</summary>
        public FileProperties FileProperties {
                 get { return fileProperties; }
        }
-       
+
        /// <summary>Whether to enable the library to print messages to the console.</summary>
        /// <remarks>Messages will be shown along with the main methods of <see cref="SubtitleFactory" />
        /// and <see cref="Subtitles" />. The default value is false.</remarks>
@@ -65,29 +65,29 @@ public class SubtitleFactory {
                get { return VerboseConsole.Verbose; }
                set { VerboseConsole.Verbose = value; }
        }
-       
+
        /// <summary>Whether to detect and store incomplete subtitles found upon open.</summary>
        /// <remarks>The default value is false.</remarks>
        public bool IncludeIncompleteSubtitles {
                get { return includeIncompleteSubtitles; }
                set { includeIncompleteSubtitles = value; }
        }
-       
+
        /// <summary>The encoding to be used upon open.</summary>
        /// <remarks>When set to null, encoding auto-detection is used. The default value is null (use 
auto-detection).</remarks>
        public Encoding Encoding {
                get { return encoding; }
                set { encoding = value; }
        }
-       
+
        /// <summary>The encoding to fallback to when using encoding auto-detection.</summary>
        /// <remarks>When using encoding auto-detection, this encoding will be used if no encoding could be 
auto-detected.
        /// Defaults to Windows-1252.</remarks>
        public Encoding FallbackEncoding {
                get { return fallbackEncoding; }
-               set { fallbackEncoding = value; }       
+               set { fallbackEncoding = value; }
        }
-       
+
        /// <summary>The type of the subtitle being opened.</summary>
        /// <remarks>When set to <see cref="SubtitleType.Unknown" />, subtitle type auto-detection is used.
        /// The default value is <see cref="SubtitleType.Unknown" /> (auto-detection).</remarks>
@@ -95,31 +95,31 @@ public class SubtitleFactory {
                get { return subtitleType; }
                set { subtitleType = value; }
        }
-       
+
        /// <summary>The frame rate of the subtitle being opened, for frame-based files.</summary>
        public float InputFrameRate {
                get { return inputFrameRate; }
                set { inputFrameRate = value; }
        }
-       
+
        /// <summary>The file size limit for subtitle files, in bytes.</summary>
        /// <remarks>Defaults to 1,000,000 bytes (1MB). Setting the value to -1 disables validation.</remarks>
        public int MaxFileSize {
                get { return maxFileSize; }
                set { maxFileSize = value; }
        }
-       
-       
+
+
        /* Public methods */
-       
+
        /// <summary>Creates new empty <see cref="Subtitles" />.</summary>
        /// <returns>The newly created subtitles.</returns>
        public Subtitles New () {
                SubtitleCollection collection = new SubtitleCollection();
                SubtitleProperties properties = new SubtitleProperties();
-               return new Subtitles(collection, properties);   
+               return new Subtitles(collection, properties);
        }
-       
+
        /// <summary>Creates <see cref="Subtitles" /> by opening the file at the specified path.</summary>
        /// <remarks>The properties of the opened file are accessible with <see cref="FileProperties" />, 
after opening.</remarks>
        /// <returns>The opened subtitles.</returns>
@@ -129,14 +129,14 @@ public class SubtitleFactory {
                SubtitleFormat format = null;
                string text = String.Empty;
                Encoding fileEncoding = null;
-               
+
                if (maxFileSize != -1) {
                        FileInfo info = new FileInfo(path);
                        if (info.Length > maxFileSize) {
                                throw new FileTooLargeException(String.Format("The file size ({0:n} bytes) is 
larger than the maximum limit ({1:n} bytes).", info.Length, maxFileSize));
                        }
                }
-               
+
                SubtitleInput input = new SubtitleInput(fallbackEncoding, subtitleType);
                if (encoding == null) {
                        text = input.Read(path, out fileEncoding, out format);
@@ -144,14 +144,14 @@ public class SubtitleFactory {
                else {
                        text = input.Read(path, encoding, out format);
                        fileEncoding = encoding;
-               }               
-               
+               }
+
                if (IsTextEmpty(text))
                        return EmptySubtitles(path);
                else
                        return ParsedSubtitles(path, fileEncoding, format, inputFrameRate, text);
        }
-       
+
        /// <summary>Creates <see cref="Subtitles" /> by opening the plain text file at the specified 
path.</summary>
        /// <remarks>The properties of the opened file are accessible with <see cref="FileProperties" />, 
after opening.</remarks>
        /// <returns>The opened lines turned into subtitles.</returns>
@@ -159,8 +159,8 @@ public class SubtitleFactory {
        /// <exception cref="UnknownSubtitleFormatException">Thrown if a subtitle format could not be 
detected.</exception>
        public Subtitles OpenPlain (string path, bool withCharacterNames, TimingMode timingMode, string 
lineSeparator) {
                string text = String.Empty;
-               Encoding fileEncoding = null;   
-               
+               Encoding fileEncoding = null;
+
                SubtitleInput input = new SubtitleInput(fallbackEncoding, subtitleType);
                if (encoding == null) {
                        text = input.ReadPlain(path, out fileEncoding);
@@ -168,62 +168,62 @@ public class SubtitleFactory {
                else {
                        text = input.ReadPlain(path, encoding);
                        fileEncoding = encoding;
-               }               
+               }
                if (IsTextEmpty(text))
                        return EmptySubtitles(path);
                else
-                       return ParsedSubtitlesPlain(path, fileEncoding, text, withCharacterNames, 
+                       return ParsedSubtitlesPlain(path, fileEncoding, text, withCharacterNames,
                                            timingMode, lineSeparator);
        }
-               
+
        /* Private members */
-               
+
        private Subtitles ParsedSubtitles (string path, Encoding fileEncoding, SubtitleFormat format, float 
inputFrameRate, string text) {
                SubtitleCollection collection = null;
                SubtitleParser subtitleParser = new SubtitleParser(includeIncompleteSubtitles);
                ParsingProperties parsingProperties = subtitleParser.Parse(text, format, inputFrameRate, out 
collection, out incompleteSubtitles);
-               
+
                SubtitleProperties subtitleProperties = new SubtitleProperties(parsingProperties);
                collection.SetPropertiesForAll(subtitleProperties);
-               
+
                Subtitles subtitles = new Subtitles(collection, subtitleProperties);
                CompleteTimingsAfterParsing(subtitles, parsingProperties);
-               
+
                fileProperties = new FileProperties(path, fileEncoding, format.Type, 
parsingProperties.TimingMode);
 
                VerboseConsole.WriteLine("[*] Opened \"" + path + "\" with encoding \"" + fileEncoding + "\", 
format \"" + format.Name + "\", timing mode \"" + parsingProperties.TimingMode + "\" and frame rate \"" + 
subtitleProperties.CurrentFrameRate + "\" (input frame rate was \"" + inputFrameRate + "\")");
                return subtitles;
        }
-       
+
        private Subtitles ParsedSubtitlesPlain (string path, Encoding fileEncoding, string text, bool 
withCharacterNames, TimingMode timingMode, string lineSeparator) {
                SubtitleCollection collection = null;
                PlainTextParser plainParser = new PlainTextParser(withCharacterNames, lineSeparator);
                ParsingProperties parsingProperties = plainParser.Parse(text, timingMode, fileEncoding, out 
collection);
-               
+
                SubtitleProperties subtitleProperties = new SubtitleProperties(parsingProperties);
                collection.SetPropertiesForAll(subtitleProperties);
-               
+
                Subtitles subtitles = new Subtitles(collection, subtitleProperties);
                CompleteTimingsAfterParsing(subtitles, parsingProperties);
-               
+
                fileProperties = new FileProperties(path, fileEncoding, parsingProperties.TimingMode);
-               
+
                VerboseConsole.WriteLine("[*] Opened " + path + " with encoding " + fileEncoding);
                return subtitles;
        }
-               
+
        private Subtitles EmptySubtitles (string path) {
                Subtitles subtitles = New();
                fileProperties = new FileProperties(path, Encoding.UTF8, SubtitleType.Unknown, 
TimingMode.Times);
                return subtitles;
        }
-       
+
        private bool IsTextEmpty (string text) {
                Regex regex = new Regex(@"\s*");
                Match match = regex.Match(text);
                return (match.Length == text.Length);
        }
-       
+
        private void CompleteTimingsAfterParsing(Subtitles subtitles, ParsingProperties parsingProperties){
                float originalFrameRate = subtitles.Properties.OriginalFrameRate;
                subtitles.Properties.SetCurrentFrameRate(originalFrameRate);
diff --git a/src/SubLib/Core/SubtitleSaver.cs b/src/SubLib/Core/SubtitleSaver.cs
index 24b3371..0d833ca 100644
--- a/src/SubLib/Core/SubtitleSaver.cs
+++ b/src/SubLib/Core/SubtitleSaver.cs
@@ -28,18 +28,18 @@ namespace SubLib.Core {
 public class SubtitleSaver {
        private FileProperties fileProperties = null;
 
-       
+
        /* Public properties */
-       
+
        /// <summary>The new properties of the file after saving.</summary>
        /// <remarks>This includes the updated <see cref="TimingMode" /> for the subtitles after saving. When 
saving to
        /// a subtitle format that supports only time or frame timing modes, this is updated to reflect 
that.</remarks>
        public FileProperties FileProperties {
                get { return fileProperties; }
        }
-       
+
        /* Public methods */
-       
+
        /// <summary>Saves subtitles to the file with the specified properties.</summary>
        /// <param name="subtitles">The subtitles to save.</param>
        /// <param name="properties">The properties of the file to save the subtitles to. Its <see 
cref="TimingMode" /> property is used to
@@ -52,17 +52,17 @@ public class SubtitleSaver {
 
                string text = output.Build(subtitles.Collection, subtitles.Properties, properties);
                FileInputOutput.WriteFile(properties.Path, text, properties.Encoding);
-               
-               fileProperties = GetUpdatedFileProperties(properties); 
+
+               fileProperties = GetUpdatedFileProperties(properties);
                VerboseConsole.WriteLine("[*] Saved " + textType + " \"" + properties.Path + "\" with 
encoding \"" + properties.Encoding + "\", format \"" + format.Name + "\" and frame rate \"" + 
subtitles.Properties.CurrentFrameRate + "\"");
        }
-       
+
        /* Private methods */
-       
+
        private FileProperties GetUpdatedFileProperties (FileProperties properties) {
                SubtitleFormat format = BuiltInSubtitleFormats.GetFormat(properties.SubtitleType);
                TimingMode newTimingMode = (format.Mode == SubtitleMode.Both) ? properties.TimingMode : 
format.ModeAsTimingMode;
-               
+
                return new FileProperties(properties.Path, properties.Encoding, properties.SubtitleType, 
newTimingMode, properties.NewlineType);
        }
 }
diff --git a/src/SubLib/Core/Timing/AdjustOperator.cs b/src/SubLib/Core/Timing/AdjustOperator.cs
index aa9ce20..dacfd7c 100644
--- a/src/SubLib/Core/Timing/AdjustOperator.cs
+++ b/src/SubLib/Core/Timing/AdjustOperator.cs
@@ -25,15 +25,15 @@ namespace SubLib.Core.Timing {
 /// <summary>Performs adjustment operations.</summary>
 public class AdjustOperator {
        private Subtitles subtitles = null;
-       
+
        public AdjustOperator (Subtitles subtitles) {
                this.subtitles = subtitles;
        }
 
        /* Public members */
-       
+
        /// <summary>Auto adjusts the subtitles given the correct times for the first and last 
subtitle.</summary>
-       /// <remarks>The subtitles are first shifted to the first subtitle's correct time, and then 
proportionally 
+       /// <remarks>The subtitles are first shifted to the first subtitle's correct time, and then 
proportionally
        /// adjusted using the last subtitle's correct time.</remarks>
        /// <param name="startTime">The correct start time for the first subtitle.</param>
        /// <param name="endTime">The correct start time for the last subtitle.</param>
@@ -43,9 +43,9 @@ public class AdjustOperator {
                int endIndex = subtitles.Collection.Count - 1;
                return Adjust(startIndex, startTime, endIndex, endTime);
        }
-       
+
        /// <summary>Auto adjusts a range of subtitles given their first and last correct times.</summary>
-       /// <remarks>The subtitles are first shifted to the first subtitle's correct time, and then 
proportionally 
+       /// <remarks>The subtitles are first shifted to the first subtitle's correct time, and then 
proportionally
        /// adjusted using the last subtitle's correct time.</remarks>
        /// <param name="startIndex">The subtitle index to start the adjustment with.</param>
        /// <param name="startTime">The correct start time for the first subtitle.</param>
@@ -55,9 +55,9 @@ public class AdjustOperator {
        public bool Adjust (int startIndex, TimeSpan startTime, int endIndex, TimeSpan endTime) {
                return SyncUtil.Sync(subtitles, startIndex, startTime, endIndex, endTime, true);
        }
-       
+
        /// <summary>Auto adjusts the subtitles given the correct frames for the first and last 
subtitle.</summary>
-       /// <remarks>The subtitles are first shifted to the first subtitle's correct frame, and then 
proportionally 
+       /// <remarks>The subtitles are first shifted to the first subtitle's correct frame, and then 
proportionally
        /// adjusted using the last subtitle's correct frame.</remarks>
        /// <param name="startFrame">The correct start frame for the first subtitle.</param>
        /// <param name="endFrame">The correct start frame for the last subtitle.</param>
@@ -67,9 +67,9 @@ public class AdjustOperator {
                int endIndex = subtitles.Collection.Count - 1;
                return Adjust(startIndex, startFrame, endIndex, endFrame);
        }
-       
+
        /// <summary>Auto adjusts a range of subtitles given their first and last correct frames.</summary>
-       /// <remarks>The subtitles are first shifted to the first subtitle's correct frame, and then 
proportionally 
+       /// <remarks>The subtitles are first shifted to the first subtitle's correct frame, and then 
proportionally
        /// adjusted using the last subtitle's correct frame.</remarks>
        /// <param name="startIndex">The subtitle index to start the adjustment with.</param>
        /// <param name="startFrame">The correct start frame for the first subtitle.</param>
diff --git a/src/SubLib/Core/Timing/FrameRateOperator.cs b/src/SubLib/Core/Timing/FrameRateOperator.cs
index 590676b..b899427 100644
--- a/src/SubLib/Core/Timing/FrameRateOperator.cs
+++ b/src/SubLib/Core/Timing/FrameRateOperator.cs
@@ -25,14 +25,14 @@ namespace SubLib.Core.Timing {
 /// <summary>Performs frame rate operations.</summary>
 public class FrameRateOperator {
        private Subtitles subtitles = null;
-       
+
        public FrameRateOperator (Subtitles subtitles) {
                this.subtitles = subtitles;
        }
 
        /* Public members */
-       
-       
+
+
        /// <summary>Changes the current frame rate of the subtitles.</summary>
        /// <param name="frameRate">The new frame rate to be used.</param>
        /// <remarks>This changes the frame rate currently being used with the subtitles, which is sometimes
@@ -44,7 +44,7 @@ public class FrameRateOperator {
                        subtitles.UpdateFramesFromTimes(frameRate);
                }
        }
-       
+
        /// <summary>Updates the subtitles' frames using the specified frame rate as the one they had when 
they were opened.</summary>
        /// <param name="frameRate">The original subtitles' frame rate.</param>
        /// <remarks>This results on having the subtitles with the frames they would have if they had been 
opened with this frame rate.
diff --git a/src/SubLib/Core/Timing/MergeOperator.cs b/src/SubLib/Core/Timing/MergeOperator.cs
index ff0b4d8..a570f53 100644
--- a/src/SubLib/Core/Timing/MergeOperator.cs
+++ b/src/SubLib/Core/Timing/MergeOperator.cs
@@ -25,13 +25,13 @@ namespace SubLib.Core.Timing {
 /// <summary>Performs merge operations.</summary>
 public class MergeOperator {
        private Subtitles subtitles = null;
-       
+
        public MergeOperator (Subtitles subtitles) {
                this.subtitles = subtitles;
        }
 
        /* Public members */
-       
+
        public bool Merge (int firstSubtitleNumber, int lastSubtitleNumber) {
                if (!isOperationValid(firstSubtitleNumber, lastSubtitleNumber))
                        return false;
@@ -40,17 +40,17 @@ public class MergeOperator {
                        return true;
                }
        }
-       
-       
+
+
        /* Private members */
-       
+
        /// <summary>Splits a subtitle in two halves. The subtitle passed as parameter is turned into the 
first half and the second half is returned.</summary>
        /// <param name="subtitles">The subtitle to split</param>
        /// <param name="subtitleProperties">The subtitle properties</param>
        /// <param name="timeBetweenSubtitles">Time between the 2 subtitles, in milliseconds</param>
        private void Merge (Subtitles subtitles, int firstSubtitleNumber, int lastSubtitleNumber) {
                Subtitle firstSubtitle = subtitles.Collection[firstSubtitleNumber];
-               
+
                /* Add lines */
                for (int currentSubtitleNumber = firstSubtitleNumber + 1 ; currentSubtitleNumber <= 
lastSubtitleNumber ; currentSubtitleNumber++) {
                        Subtitle currentSubtitle = subtitles.Collection[currentSubtitleNumber];
@@ -59,16 +59,16 @@ public class MergeOperator {
                                firstSubtitle.Translation.Add(currentSubtitle.Translation.GetLines());
                        }
                }
-               
+
                /* Set times */
                Subtitle lastSubtitle = subtitles.Collection[lastSubtitleNumber];
                firstSubtitle.Times.End = lastSubtitle.Times.End;
        }
-       
+
        bool isOperationValid (int firstSubtitleNumber, int lastSubtitleNumber) {
                if (firstSubtitleNumber > lastSubtitleNumber)
                        return false;
-                       
+
                Subtitle firstSubtitle = subtitles.Collection[firstSubtitleNumber];
                Subtitle lastSubtitle = subtitles.Collection[lastSubtitleNumber];
                return (firstSubtitle != null) && (lastSubtitle != null) && (firstSubtitle.Times.Start <= 
lastSubtitle.Times.End);
diff --git a/src/SubLib/Core/Timing/ShiftOperator.cs b/src/SubLib/Core/Timing/ShiftOperator.cs
index bef5b17..8e1d23d 100644
--- a/src/SubLib/Core/Timing/ShiftOperator.cs
+++ b/src/SubLib/Core/Timing/ShiftOperator.cs
@@ -25,20 +25,20 @@ namespace SubLib.Core.Timing {
 /// <summary>Performs shift operations.</summary>
 public class ShiftOperator {
        private Subtitles subtitles = null;
-       
+
        public ShiftOperator (Subtitles subtitles) {
                this.subtitles = subtitles;
        }
 
        /* Public members */
-       
+
        /// <summary>Shifts the subtitles a specified amount of time.</summary>
        /// <param name="time">The time to use, which can be positive or negative.</param>
        public void Shift (TimeSpan time) {
                foreach (Subtitle subtitle in subtitles.Collection)
                        subtitle.Times.Shift(time);
        }
-       
+
        /// <summary>Shifts a range of subtitles a specified amount of time.</summary>
        /// <param name="time">The time to use, which can be positive or negative.</param>
        /// <param name="startIndex">The subtitle index the range begins with.</param>
@@ -52,14 +52,14 @@ public class ShiftOperator {
                        subtitle.Times.Shift(time);
                }
        }
-       
+
        /// <summary>Shifts the subtitles a specified amount of frames.</summary>
        /// <param name="frames">The frames to use, which can be positive or negative.</param>
        public void Shift (int frames) {
                foreach (Subtitle subtitle in subtitles.Collection)
                        subtitle.Frames.Shift(frames);
        }
-       
+
        /// <summary>Shifts a range of subtitles a specified amount of frames.</summary>
        /// <param name="frames">The frames to use, which can be positive or negative.</param>
        /// <param name="startIndex">The subtitle index the range begins with.</param>
@@ -73,10 +73,10 @@ public class ShiftOperator {
                        subtitle.Frames.Shift(frames);
                }
        }
-       
-       
+
+
        /* Private members */
-       
+
        private bool AreShiftArgsValid (int startIndex, int endIndex) {
                int subtitleCount = subtitles.Collection.Count;
                if (subtitleCount == 0)
diff --git a/src/SubLib/Core/Timing/SplitOperator.cs b/src/SubLib/Core/Timing/SplitOperator.cs
index 4cdf23c..be31573 100644
--- a/src/SubLib/Core/Timing/SplitOperator.cs
+++ b/src/SubLib/Core/Timing/SplitOperator.cs
@@ -26,32 +26,32 @@ namespace SubLib.Core.Timing {
 public class SplitOperator {
        private Subtitles subtitles = null;
        private int timeBetweenSubtitles = -1;
-       
+
        public SplitOperator (Subtitles subtitles, int timeBetweenSubtitles) {
                this.subtitles = subtitles;
                this.timeBetweenSubtitles = timeBetweenSubtitles;
        }
 
        /* Public members */
-       
+
        public Subtitle Split (Subtitle subtitle) {
                if (!isOperationValid(subtitle))
                        return null;
-               
+
                Subtitle subtitle2 = Split(subtitle, this.subtitles.Properties, this.timeBetweenSubtitles);
                return subtitle2;
        }
-       
-       
+
+
        /* Private members */
-       
+
        /// <summary>Splits a subtitle in two halves. The subtitle passed as parameter is turned into the 
first half and the second half is returned.</summary>
        /// <param name="subtitle">The subtitle to split</param>
        /// <param name="subtitleProperties">The subtitle properties</param>
        /// <param name="timeBetweenSubtitles">Time between the 2 subtitles, in milliseconds</param>
        private Subtitle Split (Subtitle subtitle, SubtitleProperties subtitleProperties, int 
timeBetweenSubtitles) {
                Subtitle subtitle2 = subtitle.Clone(subtitleProperties);
-               
+
                /* Change timings */
                int originalStart = (int)subtitle.Times.Start.TotalMilliseconds;
                int originalEnd = (int)subtitle.Times.End.TotalMilliseconds;
@@ -69,7 +69,7 @@ public class SplitOperator {
                        subtitle.Times.End = TimeSpan.FromMilliseconds(newSubtitleEnd);
                        subtitle2.Times.Start = TimeSpan.FromMilliseconds(subtitle2Start);
                }
-               
+
                /* Change subtitle text */
                string[] textLines = subtitle.Text.GetLines();
                if (textLines.Length == 1)
@@ -81,7 +81,7 @@ public class SplitOperator {
                        subtitle.Text.Set(textLinesHalf1);
                        subtitle2.Text.Set(textLinesHalf2);
                }
-               
+
                /* Change translation text */
                if (subtitle.HasTranslation) {
                        string[] translationLines = subtitle.Translation.GetLines();
@@ -95,21 +95,21 @@ public class SplitOperator {
                                subtitle2.Translation.Set(translationLinesHalf2);
                        }
                }
-               
+
                return subtitle2;
        }
-       
+
        private bool isOperationValid (Subtitle subtitle) {
                return subtitle.Times.End >= subtitle.Times.Start;
        }
-       
+
        private void SplitArray<T> (T[] array, ref T[] half1, ref T[] half2) {
                if (array == null) {
                        half1 = null;
                        half2 = null;
                        return;
                }
-               
+
                int arrayLength = array.Length;
                if (arrayLength == 0) {
                        half1 = new T[0];
diff --git a/src/SubLib/Core/Timing/SyncUtil.cs b/src/SubLib/Core/Timing/SyncUtil.cs
index 3db73b4..35ded34 100644
--- a/src/SubLib/Core/Timing/SyncUtil.cs
+++ b/src/SubLib/Core/Timing/SyncUtil.cs
@@ -29,7 +29,7 @@ public class SyncUtil {
        }
 
        /// <summary>Auto syncs a range of subtitles given their first and last correct times.</summary>
-       /// <remarks>The subtitles are first shifted to the first subtitle's correct time, and then 
proportionally 
+       /// <remarks>The subtitles are first shifted to the first subtitle's correct time, and then 
proportionally
        /// adjusted using the last subtitle's correct time.</remarks>
        /// <param name="subtitles">The subtitles to sync.</param>
        /// <param name="startIndex">The subtitle index to start the adjustment with.</param>
@@ -54,7 +54,7 @@ public class SyncUtil {
                        ShiftOperator shiftOp = new ShiftOperator(subtitles);
                        shiftOp.Shift(shift, startIndex, syncEndIndex);
                }
-               
+
                /* Sync timings with proportion */
                for (int index = startIndex ; index <= syncEndIndex ; index++) {
                        Subtitle subtitle = subtitles.Collection.Get(index);
@@ -62,9 +62,9 @@ public class SyncUtil {
                }
                return true;
        }
-       
+
        /// <summary>Auto syncs a range of subtitles given their first and last correct frames.</summary>
-       /// <remarks>The subtitles are first shifted to the first subtitle's correct frame, and then 
proportionally 
+       /// <remarks>The subtitles are first shifted to the first subtitle's correct frame, and then 
proportionally
        /// adjusted using the last subtitle's correct frame.</remarks>
        /// <param name="subtitles">The subtitles to sync.</param>
        /// <param name="startIndex">The subtitle index to start the adjustment with.</param>
@@ -89,7 +89,7 @@ public class SyncUtil {
                        ShiftOperator shiftOp = new ShiftOperator(subtitles);
                        shiftOp.Shift(shift, startIndex, syncEndIndex);
                }
-               
+
                /* Auto adjust timings with proportion */
                for (int index = startIndex ; index <= syncEndIndex ; index++) {
                        Subtitle subtitle = subtitles.Collection.Get(index);
@@ -100,7 +100,7 @@ public class SyncUtil {
 
        public static TimeSpan Scale (TimeSpan currentTime, TimeSpan baseTime, double factor) {
                double baseMilliseconds = baseTime.TotalMilliseconds;
-       
+
                double time = currentTime.TotalMilliseconds;
                double newTime = baseMilliseconds + ((time - baseMilliseconds) * factor);
                return TimeSpan.FromMilliseconds(newTime);
@@ -109,14 +109,14 @@ public class SyncUtil {
        public static double Scale (double currentFrame, double baseFrame, double factor) {
                return baseFrame + ((currentFrame - baseFrame) * factor);
        }
-       
+
        public static bool AreSyncPointsValid (Subtitles subtitles, SyncPoint start, SyncPoint end) {
                return AreSyncArgsValid(subtitles, start.SubtitleNumber, start.Correct.Time, 
end.SubtitleNumber, end.Correct.Time)
                        && AreSyncArgsValid(subtitles, start.SubtitleNumber, start.Correct.Frame, 
end.SubtitleNumber, end.Correct.Frame);
        }
-       
+
        /* Private members */
-       
+
        private static bool AreSyncArgsValid (Subtitles subtitles, int startIndex, TimeSpan startTime, int 
endIndex, TimeSpan endTime) {
                if (!AreSyncIndicesValid(subtitles, startIndex, endIndex))
                        return false;
@@ -125,7 +125,7 @@ public class SyncUtil {
                else
                        return true;
        }
-       
+
        private static bool AreSyncArgsValid (Subtitles subtitles, int startIndex, int startTime, int 
endIndex, int endTime) {
                if (!AreSyncIndicesValid(subtitles, startIndex, endIndex))
                        return false;
@@ -134,7 +134,7 @@ public class SyncUtil {
                else
                        return true;
        }
-       
+
        private static bool AreSyncIndicesValid (Subtitles subtitles, int startIndex, int endIndex) {
                int subtitleCount = subtitles.Collection.Count;
                if (subtitleCount < 2)
diff --git a/src/SubLib/Core/Timing/SynchronizeOperator.cs b/src/SubLib/Core/Timing/SynchronizeOperator.cs
index 1ef4fe1..9438be0 100644
--- a/src/SubLib/Core/Timing/SynchronizeOperator.cs
+++ b/src/SubLib/Core/Timing/SynchronizeOperator.cs
@@ -25,13 +25,13 @@ namespace SubLib.Core.Timing {
 /// <summary>Performs synchronization operations.</summary>
 public class SynchronizeOperator {
        private Subtitles subtitles = null;
-       
+
        public SynchronizeOperator (Subtitles subtitles) {
                this.subtitles = subtitles;
        }
 
        /* Public members */
-       
+
        public bool Sync (SyncPoints syncPoints, bool toSyncAll) {
                SyncPoints pointsToUse = AdaptForOperation(syncPoints, toSyncAll);
                if (!AreSyncArgsValid(pointsToUse)) {
@@ -42,26 +42,26 @@ public class SynchronizeOperator {
                        bool syncLast = (index == pointsToUse.Count - 1);
                        SyncPoint current = pointsToUse[index];
                        SyncUtil.Sync(subtitles, previous, current, syncLast);
-               
+
                        previous = current;
                }
-               
+
                return true;
        }
-       
-       
+
+
        /* Private members */
 
        private SyncPoints AdaptForOperation (SyncPoints syncPoints, bool toSyncAll) {
                if ((syncPoints == null) || (!toSyncAll) || (toSyncAll && (syncPoints.Count < 2)))
                        return syncPoints;
-               
+
                SyncPoints adapted = syncPoints.Clone();
 
                /* Add the first subtitle if possible */
                int firstSubtitleNumber = 0;
                if ((subtitles.Collection.Count > 1) && (!adapted.Contains(firstSubtitleNumber))) {
-                       
+
                        /* Calculate sync shift and factor using the last 2 sync points */
                        SyncPoint firstSyncPoint = adapted[0];
                        SyncPoint secondSyncPoint = adapted[1];
@@ -69,7 +69,7 @@ public class SynchronizeOperator {
                        Subtitle secondSyncPointSubtitle = 
subtitles.Collection[secondSyncPoint.SubtitleNumber];
                        TimeSpan shift = firstSyncPoint.Correct.Time - 
firstSyncPointSubtitle.Times.PreciseStart;
                        double factor = (secondSyncPoint.Correct.Time - 
firstSyncPoint.Correct.Time).TotalMilliseconds / (secondSyncPointSubtitle.Times.PreciseStart - 
firstSyncPointSubtitle.Times.PreciseStart).TotalMilliseconds;
-                       
+
                        /* Calculate new time */
                        Subtitle firstSubtitle = subtitles.Collection[firstSubtitleNumber];
                        TimeSpan firstSubtitleNewTime = firstSubtitle.Times.Start + shift; //Apply shift
@@ -83,13 +83,13 @@ public class SynchronizeOperator {
                        SyncPoint newFirstSyncPoint = new SyncPoint(firstSubtitleNumber, 
firstSubtitleCurrentTiming, firstSubtitleNewTiming);
                        adapted.Add(newFirstSyncPoint);
                }
-               
+
                /* Add last subtitle if possible */
                int lastSubtitleNumber = subtitles.Collection.Count - 1;
                if ((subtitles.Collection.Count > 1) && (!adapted.Contains(lastSubtitleNumber))) {
 
                        /* Calculate sync shift and factor using the last 2 sync points */
-                       SyncPoint penultSyncPoint = adapted[adapted.Count - 2];                 
+                       SyncPoint penultSyncPoint = adapted[adapted.Count - 2];
                        SyncPoint lastSyncPoint = adapted[adapted.Count - 1];
                        Subtitle penultSyncPointSubtitle = 
subtitles.Collection[penultSyncPoint.SubtitleNumber];
                        Subtitle lastSyncPointSubtitle = subtitles.Collection[lastSyncPoint.SubtitleNumber];
@@ -106,10 +106,10 @@ public class SynchronizeOperator {
                        SyncPoint newLastSyncPoint = new SyncPoint(lastSubtitleNumber, 
lastSubtitleCurrentTiming, lastSubtitleNewTiming);
                        adapted.Add(newLastSyncPoint);
                }
-               
+
                return adapted;
        }
-       
+
        private bool AreSyncArgsValid (SyncPoints syncPoints) {
                if ((syncPoints == null) || (syncPoints.Count < 2) || (syncPoints[syncPoints.Count - 
1].SubtitleNumber > subtitles.Collection.Count))
                        return false;
@@ -119,12 +119,12 @@ public class SynchronizeOperator {
                        SyncPoint current = syncPoints[index];
                        if (!SyncUtil.AreSyncPointsValid(subtitles, previous, current))
                                return false;
-               
+
                        previous = current;
                }
                return true;
        }
-       
+
 }
 
 }
diff --git a/src/SubLib/Core/Timing/TimingUtil.cs b/src/SubLib/Core/Timing/TimingUtil.cs
index c449d02..64bddec 100644
--- a/src/SubLib/Core/Timing/TimingUtil.cs
+++ b/src/SubLib/Core/Timing/TimingUtil.cs
@@ -33,7 +33,7 @@ public class TimingUtil {
                TimeSpan time = TimeSpan.FromSeconds(seconds);
                return time;
        }
-       
+
        /// <summary>Converts the specified time to frames, given a frame rate.</summary>
        /// <param name="time">The time to convert to frames.</param>
        /// <param name="frameRate">The frame rate to be used in the conversion.</param>
@@ -43,7 +43,7 @@ public class TimingUtil {
                double frames = seconds * frameRate;
                return frames;
        }
-       
+
        /// <summary>Converts the specified time to frames, given a frame rate.</summary>
        /// <param name="time">The time, in seconds, to convert to frames.</param>
        /// <param name="frameRate">The frame rate to be used in the conversion.</param>
@@ -52,7 +52,7 @@ public class TimingUtil {
                double frames = time * frameRate;
                return frames;
        }
-       
+
        /// <summary>Converts the specified time to frames, given a frame rate.</summary>
        /// <param name="time">The time, in milliseconds, to convert to frames.</param>
        /// <param name="frameRate">The frame rate to be used in the conversion.</param>
diff --git a/src/SubLib/Core/Translations.cs b/src/SubLib/Core/Translations.cs
index 8200194..7022066 100644
--- a/src/SubLib/Core/Translations.cs
+++ b/src/SubLib/Core/Translations.cs
@@ -21,15 +21,15 @@ using SubLib.Core.Domain;
 
 namespace SubLib.Core {
 
-/// <summary>Allows to import translation subtitles into existing subtitles.</summary> 
+/// <summary>Allows to import translation subtitles into existing subtitles.</summary>
 public class Translations {
 
        /// <summary>Creates a new instance of the <see cref="Translations" /> class.</summary>
        public Translations () {
        }
-       
+
        /* Public methods */
-       
+
        //TODO have more elaborate heuristics, taking the times into account and reporting errors
        /// <summary>Imports translated subtitles into existing subtitles.</summary>
        /// <param name="subtitles">The subtitles to import the translation to.</param>
@@ -38,14 +38,14 @@ public class Translations {
                AddExtraSubtitles(subtitles, translation, timeBetweenSubtitles);
                CopyTranslation(subtitles, translation);
        }
-       
+
        /// <summary>Removes the entire translation from existing subtitles.</summary>
        /// <param name="subtitles">The subtitles to remove the translation from.</param>
        public void Clear (Subtitles subtitles) {
                foreach (Subtitle subtitle in subtitles.Collection)
                        subtitle.ClearTranslation();
        }
-       
+
        /* Private methods */
 
        /// <summary>Adds the number of subtitles that the translation has more than the original 
subtitles.</summary>
@@ -62,18 +62,18 @@ public class Translations {
 
                if (extraCount <= 0)
                        return;
-               
+
                for (int position = subtitlesCount - 1 ; position < translationCount - 1 ; position++) {
                        subtitles.Collection.AddNewAfter(position, subtitles.Properties, 
timeBetweenSubtitles);
                }
        }
-       
+
        /// <summary>Copies the translation to the subtitles.</summary>
        private void CopyTranslation (Subtitles subtitles, Subtitles translation) {
                for (int subtitleNumber = 0 ; subtitleNumber < translation.Collection.Count ; 
subtitleNumber++) {
                        Subtitle translated = translation.Collection[subtitleNumber];
                        Subtitle original = subtitles.Collection[subtitleNumber];
-                       
+
                        string translatedText = translated.Text.Get();
                        original.Translation.Set(translatedText);
                }
diff --git a/src/SubLib/Core/Translator.cs b/src/SubLib/Core/Translator.cs
index de8ee35..9eedadc 100644
--- a/src/SubLib/Core/Translator.cs
+++ b/src/SubLib/Core/Translator.cs
@@ -27,53 +27,53 @@ using System.Text.RegularExpressions;
 using System.Text;
 
 namespace SubLib.Core {
-       /// <summary>Allows translating subtitles from one language to another using Google Translate 
service.</summary>        
+       /// <summary>Allows translating subtitles from one language to another using Google Translate 
service.</summary>
        public class Translator {
                private const string REQUEST_URL_FORMAT = 
"http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&{0}langpair={1}|{2}";
                private const string REQUEST_LINE_FORMAT = "q={0}&";
-               
+
                private const char SPLIT_CHAR = '\n';
                private const char CULTURE_REPLACEE = '_';
                private const char CULTURE_REPLACER = '-';
-               
+
                private const string JSON_RESPONSE_SUCCESS = "200";
-               
+
                private const string REGEX_ERROR_MATCH = @"^.*\""responseDetails\"": 
(.+),.*\""responseStatus\"":.*([0-9][0-9][0-9]).*$";
                private const string REGEX_RESPONSE_MATCH = @"\""translatedText\"":\""([^\""]*)";
                private const int REGEX_MATCH_INDEX_ONE_VALUE = 1;
                private const int REGEX_MATCH_INDEX_TWO_VALUE = 2;
-               
+
                public const int TIMEOUT = 3000;
 
-                               
+
                /* Public methods */
-               
+
                /// <summary>Translates given text between two given languages.</summary>
                public static string TranslateText (string inputText, string fromLanguage, string toLanguage, 
int timeoutMillis) {
                        // testing emptiness of the string
                        if (inputText.Trim().Length == 0)
                                return String.Empty;
-                       
+
                        // splitting input text into single lines; line-breaks cannot be transferred to 
Google Translate
                        StringBuilder stringBuilder = new StringBuilder();
                        foreach (String split in inputText.Split(SPLIT_CHAR)) {
                                stringBuilder.Append(String.Format(REQUEST_LINE_FORMAT, 
System.Web.HttpUtility.UrlEncode(split)));
                        }
-                       
+
                        try {
                    //TODO 'key' parameter could be added
                                // building request URL
-                               string requestUrl = String.Format(REQUEST_URL_FORMAT, 
stringBuilder.ToString(),                                                           
+                               string requestUrl = String.Format(REQUEST_URL_FORMAT, 
stringBuilder.ToString(),
                        CultureInfo.CreateSpecificCulture(fromLanguage.Replace(CULTURE_REPLACEE, 
CULTURE_REPLACER)).TwoLetterISOLanguageName.ToLowerInvariant(),
-                                   CultureInfo.CreateSpecificCulture(toLanguage.Replace(CULTURE_REPLACEE, 
CULTURE_REPLACER)).TwoLetterISOLanguageName.ToLowerInvariant()                               
-                   );                          
-       
+                                   CultureInfo.CreateSpecificCulture(toLanguage.Replace(CULTURE_REPLACEE, 
CULTURE_REPLACER)).TwoLetterISOLanguageName.ToLowerInvariant()
+                   );
+
                                // translating
                    HttpWebRequest req = HttpWebRequest.Create(requestUrl) as HttpWebRequest;
                                req.Timeout = timeoutMillis;
                                req.Method = WebRequestMethods.Http.Get;
                 HttpWebResponse res = req.GetResponse() as HttpWebResponse;
-                               
+
                                // processing response
                 string responseJson = new StreamReader(res.GetResponseStream()).ReadToEnd();
 
@@ -83,15 +83,15 @@ namespace SubLib.Core {
                                throw new TranslatorException(e.Message);
             }
         }
-               
-               
+
+
                /* Private methods */
-               
+
                /// <summary>Processes JSON response from Google Translate service.</summary>
                private static string ProcessJson (string responseJson) {
                        // fixing english-related quote problem
-                       responseJson = responseJson.Replace("\\\"", "\\u0026quot;"); 
-                       
+                       responseJson = responseJson.Replace("\\\"", "\\u0026quot;");
+
                        // matching responseStatus
                        StringBuilder stringBuilder = new StringBuilder();
                        Match match = Regex.Match(responseJson, REGEX_ERROR_MATCH, RegexOptions.IgnoreCase | 
RegexOptions.Compiled);
@@ -104,12 +104,12 @@ namespace SubLib.Core {
                                        if (textMatch.Success && textMatch.Groups.Count > 
REGEX_MATCH_INDEX_ONE_VALUE) {
                                                if (!first)
                                                        stringBuilder.Append(SPLIT_CHAR);
-                                                       
+
                                                
stringBuilder.Append(textMatch.Groups[REGEX_MATCH_INDEX_ONE_VALUE].Value);
                                                first = false;
                                        }
                                }
-                               
+
                                // replacing escaped characters that are not decoded automatically
                                stringBuilder = stringBuilder.Replace("\\u0026#39", "'");
                                stringBuilder = stringBuilder.Replace("\\u0026quot;", "\"");
@@ -121,13 +121,13 @@ namespace SubLib.Core {
                                stringBuilder = stringBuilder.Replace("\\u003c", "<");
                                stringBuilder = stringBuilder.Replace("\\u003e", ">");
                                stringBuilder = stringBuilder.Replace("\\\\", "\\");
-                               
+
                                return System.Web.HttpUtility.UrlDecode(stringBuilder.ToString());
                }
                        else {
                                throw new Exception((match.Groups.Count > REGEX_MATCH_INDEX_TWO_VALUE ? 
match.Groups[REGEX_MATCH_INDEX_TWO_VALUE].Value + ": " : String.Empty) + (match.Groups.Count > 
REGEX_MATCH_INDEX_ONE_VALUE ? match.Groups[REGEX_MATCH_INDEX_ONE_VALUE].Value : String.Empty));
                        }
                }
-               
+
     }
 }
\ No newline at end of file
diff --git a/src/SubLib/Exceptions/EncodingNotSupportedException.cs 
b/src/SubLib/Exceptions/EncodingNotSupportedException.cs
index a1778f6..8cd46d7 100644
--- a/src/SubLib/Exceptions/EncodingNotSupportedException.cs
+++ b/src/SubLib/Exceptions/EncodingNotSupportedException.cs
@@ -27,7 +27,7 @@ public class EncodingNotSupportedException : ApplicationException {
 
        public EncodingNotSupportedException (string message) : base(message) {
        }
-       
+
        public EncodingNotSupportedException() : base(defaultMessage) {
        }
 
diff --git a/src/SubLib/Exceptions/FileTooLargeException.cs b/src/SubLib/Exceptions/FileTooLargeException.cs
index 416c8d7..2b4c250 100644
--- a/src/SubLib/Exceptions/FileTooLargeException.cs
+++ b/src/SubLib/Exceptions/FileTooLargeException.cs
@@ -27,7 +27,7 @@ public class FileTooLargeException : ApplicationException {
 
        public FileTooLargeException (string message) : base(message) {
        }
-       
+
        public FileTooLargeException() : base(defaultMessage) {
        }
 
diff --git a/src/SubLib/Exceptions/TranslatorException.cs b/src/SubLib/Exceptions/TranslatorException.cs
index c48c4de..755c98c 100644
--- a/src/SubLib/Exceptions/TranslatorException.cs
+++ b/src/SubLib/Exceptions/TranslatorException.cs
@@ -27,7 +27,7 @@ public class TranslatorException : ApplicationException {
 
        public TranslatorException (string message) : base(message) {
        }
-       
+
        public TranslatorException() : base(defaultMessage) {
        }
 
diff --git a/src/SubLib/Exceptions/UnknownEncodingException.cs 
b/src/SubLib/Exceptions/UnknownEncodingException.cs
index 488af46..b618b80 100644
--- a/src/SubLib/Exceptions/UnknownEncodingException.cs
+++ b/src/SubLib/Exceptions/UnknownEncodingException.cs
@@ -27,7 +27,7 @@ public class UnknownEncodingException : ApplicationException {
 
        public UnknownEncodingException (string message) : base(message) {
        }
-       
+
        public UnknownEncodingException() : base(defaultMessage) {
        }
 
diff --git a/src/SubLib/Exceptions/UnknownSubtitleFormatException.cs 
b/src/SubLib/Exceptions/UnknownSubtitleFormatException.cs
index 6ec8b75..3e0a2fc 100644
--- a/src/SubLib/Exceptions/UnknownSubtitleFormatException.cs
+++ b/src/SubLib/Exceptions/UnknownSubtitleFormatException.cs
@@ -27,7 +27,7 @@ public class UnknownSubtitleFormatException : ApplicationException {
 
        public UnknownSubtitleFormatException(string message) : base(message) {
        }
-       
+
        public UnknownSubtitleFormatException() : base(defaultMessage) {
        }
 
diff --git a/src/SubLib/IO/FileInputOutput.cs b/src/SubLib/IO/FileInputOutput.cs
index da37c7d..beacaa1 100644
--- a/src/SubLib/IO/FileInputOutput.cs
+++ b/src/SubLib/IO/FileInputOutput.cs
@@ -61,7 +61,7 @@ internal class FileInputOutput {
                /* Check if no encoding was detected */
                if (detectedEncodings[0] == "nomatch")
                        return new int[0];
-               
+
                return GetCodePages(detectedEncodings);
        }
 
@@ -89,7 +89,7 @@ internal class FileInputOutput {
                        writer.Close();
                }
        }
-       
+
        internal static void WriteFile (string fileName, string text, Encoding encoding) {
                StreamWriter writer = OpenFileForWriting(fileName, encoding);
                try {
@@ -100,31 +100,31 @@ internal class FileInputOutput {
                }
        }
 
-       
+
        /* Private members */
-       
+
        private static StreamWriter OpenFileForWriting (string fileName) {
                FileStream file = new FileStream(fileName, FileMode.Create, FileAccess.Write, FileShare.None);
                StreamWriter fileWriter = new StreamWriter(file);
-               return fileWriter;      
+               return fileWriter;
        }
-       
+
        private static StreamWriter OpenFileForWriting (string fileName, Encoding encoding) {
                FileStream file = new FileStream(fileName, FileMode.Create, FileAccess.Write, FileShare.None);
                StreamWriter fileWriter = new StreamWriter(file, encoding);
-               return fileWriter;      
+               return fileWriter;
        }
-       
+
        private static int[] GetCodePages (string[] encodings) {
                ArrayList codePages = new ArrayList();
                foreach (string encoding in encodings) {
                        int codePage = GetCodePage(encoding);
                        if (codePage != -1)
-                               codePages.Add(codePage);                
+                               codePages.Add(codePage);
                }
-               return (int[])codePages.ToArray(typeof(int));   
+               return (int[])codePages.ToArray(typeof(int));
        }
-       
+
        // Note: ISO-2022-CN, HZ-GB-2312 and x-euc-tw are not defined as their code pages were not found
        private static int GetCodePage (string encoding) {
                switch (encoding) {
@@ -151,7 +151,7 @@ internal class FileInputOutput {
                }
                return result;
        }
-       
+
        /// <summary>Replaces the occurrences of Windows and Mac newline chars with unix newline.</summary>
        private static string ConvertNewLinesToUnix (string text) {
                text = text.Replace("\r\n", "\n"); //Replace Windows newline
diff --git a/src/SubLib/IO/Input/ParsingProperties.cs b/src/SubLib/IO/Input/ParsingProperties.cs
index e2a0e55..62c5ee8 100644
--- a/src/SubLib/IO/Input/ParsingProperties.cs
+++ b/src/SubLib/IO/Input/ParsingProperties.cs
@@ -25,16 +25,16 @@ internal class ParsingProperties {
        private Headers headers = new Headers();
        private TimingMode timingMode = TimingMode.Times;
        private float inputFrameRate = 25;
-       
+
        public Headers Headers {
                get { return headers; }
        }
-       
+
        public TimingMode TimingMode {
                get { return timingMode; }
                set { timingMode = value; }
        }
-       
+
        public float InputFrameRate {
                get { return inputFrameRate; }
                set { inputFrameRate = value; }
diff --git a/src/SubLib/IO/Input/PlainTextParser.cs b/src/SubLib/IO/Input/PlainTextParser.cs
index 334f93c..3a620d1 100644
--- a/src/SubLib/IO/Input/PlainTextParser.cs
+++ b/src/SubLib/IO/Input/PlainTextParser.cs
@@ -24,16 +24,16 @@ using System.Text;
 using System.Text.RegularExpressions;
 
 namespace SubLib.IO.Input {
- 
+
 internal class PlainTextParser {
-                       
+
        private bool withCharacterNames = false;
        private string lineSeparator = String.Empty;
        private string text = String.Empty;
-               
+
        internal PlainTextParser(bool withCharacterNames, string lineSeparator) {
                this.withCharacterNames = withCharacterNames;
-               this.lineSeparator = lineSeparator; 
+               this.lineSeparator = lineSeparator;
        }
 
        internal PlainTextParser(bool withCharacterNames) : this(withCharacterNames, @"\n") {
@@ -42,20 +42,20 @@ internal class PlainTextParser {
        /// <remarks>The created <see cref="SubtitleCollection" /> will have its <see 
cref="SubtitleProperties" /> property set to null.
        /// It is mandatory to use <see cref="SubtitleCollection.SetPropertiesForAll" /> after.</remarks>
        internal ParsingProperties Parse (string text, TimingMode timingMode, Encoding encoding, out 
SubtitleCollection collection) {
-               
+
                collection = new SubtitleCollection();
                ParsingProperties properties = new ParsingProperties();
                this.text = text;
                properties.TimingMode = timingMode;
-                       
+
                /* Read the subtitles */
                ReadSubtitles(encoding, properties, collection);
-                       
+
                return properties;
        }
-               
+
        private void ReadSubtitles (Encoding encoding, ParsingProperties properties, SubtitleCollection 
collection) {
-               
+
                string[] lines = text.Split(new char[] {'\n'});
                for (int i = 0; i < lines.Length; i++) {
                        SubtitleText stext = ParseSubtitleText(lines[i]);
@@ -65,9 +65,9 @@ internal class PlainTextParser {
                                collection.Add(subtitle);
                        }
                }
-               
+
        }
-               
+
        private SubtitleText ParseSubtitleText (string line) {
                string text = String.Empty;
                if (withCharacterNames) {
@@ -83,9 +83,9 @@ internal class PlainTextParser {
                if (text.Length > 0)
                        return new SubtitleText(text, lineSeparator, true);
                else return new SubtitleText();
-               
+
        }
-               
+
 }
-       
+
 }
diff --git a/src/SubLib/IO/Input/SubtitleInput.cs b/src/SubLib/IO/Input/SubtitleInput.cs
index f654144..6461d4d 100644
--- a/src/SubLib/IO/Input/SubtitleInput.cs
+++ b/src/SubLib/IO/Input/SubtitleInput.cs
@@ -41,15 +41,15 @@ internal class SubtitleInput {
        internal string Read (string path, out Encoding encoding, out SubtitleFormat format) {
                /* Open file */
                FileStream fileStream = FileInputOutput.OpenFileForReading(path);
-               
+
                return ReadSubtitleText(true, fileStream, out encoding, out format);
        }
-       
+
        /// <exception cref="UnknownSubtitleFormatException">Thrown if the subtitle format could not be 
detected.</exception>
        internal string Read (string path, Encoding encoding, out SubtitleFormat format) {
                /* Open file */
                FileStream fileStream = FileInputOutput.OpenFileForReading(path);
-               
+
                /* Read the text */
                return TestEncoding(fileStream, encoding, out format);
        }
@@ -58,16 +58,16 @@ internal class SubtitleInput {
        internal string ReadPlain (string path, out Encoding encoding) {
                /* Open file */
                FileStream fileStream = FileInputOutput.OpenFileForReading(path);
-               
+
                SubtitleFormat format = null;
                return ReadSubtitleText(false, fileStream, out encoding, out format);
        }
-       
+
        /// <exception cref="EncodingNotSupportedException">Thrown if the encoding is not supported by the 
platform.</exception>
        internal string ReadPlain (string path, Encoding encoding) {
                /* Open file */
                FileStream fileStream = FileInputOutput.OpenFileForReading(path);
-               
+
                /* Read the text */
                return TestEncoding(fileStream, encoding);
        }
@@ -85,22 +85,22 @@ internal class SubtitleInput {
                /* Init the out arguments */
                usedEncoding = null;
                usedFormat = null;
-               
+
                /* Detect code pages */
                int[] codePages = FileInputOutput.DetectCodePages(fileStream);
-               
+
                /* Check if no codepage was detected */
                if (codePages.Length == 0) {
                        VerboseConsole.WriteLine("No encoding was automatically detected. Using the fall-back 
encoding \"" + fallbackEncoding.WebName + "\"");
                        string text;
                        if (isSubtitleFile)
                                text = TestEncoding(fileStream, fallbackEncoding, out usedFormat);
-                       else 
+                       else
                                text = TestEncoding(fileStream, fallbackEncoding);
                        usedEncoding = fallbackEncoding;
                        return text;
                }
-               
+
                /* The first code page represents the most probable encoding. If any problem occurs when 
trying to use
                 * that code page, this problem is registered. The remaining code pages are then tried, and 
if none works,
                 * the first occuring error is the one to be reported. */
@@ -121,7 +121,7 @@ internal class SubtitleInput {
                catch (UnknownSubtitleFormatException e) {
                        firstSubtitleFormatException = e;
                }
-               
+
                /* Problems were found, going to try additional code pages */
                for (int count = 1 ; count < codePages.Length ; count++) {
                        try {
@@ -137,15 +137,15 @@ internal class SubtitleInput {
                                //Don't do anything, will try the next code page
                        }
                }
-               
+
                /* No code page worked, throwing the exceptions caught for the first (more probable) code 
page */
                if (firstEncodingException != null)
                        throw firstEncodingException;
                else
                        throw firstSubtitleFormatException;
-                       
+
        }
-       
+
        /// <exception cref="EncodingNotSupportedException">Thrown if the encoding is not supported by the 
platform.</exception>
        /// <exception cref="UnknownSubtitleFormatException">Thrown if the subtitle format could not be 
detected.</exception>
        private string TestCodePage (FileStream fileStream, int codePage, out Encoding encoding, out 
SubtitleFormat format) {
@@ -153,7 +153,7 @@ internal class SubtitleInput {
                TestCodePageCommon(codePage, out encoding);
                return TestEncoding(fileStream, encoding, out format);
        }
-               
+
        /// <exception cref="EncodingNotSupportedException">Thrown if the encoding is not supported by the 
platform.</exception>
        private string TestCodePagePlain (FileStream fileStream, int codePage, out Encoding encoding) {
                /* Check the encoding */
@@ -170,26 +170,26 @@ internal class SubtitleInput {
                        throw new EncodingNotSupportedException();
                }
        }
-               
+
        /// <exception cref="UnknownSubtitleFormatException">Thrown if the subtitle format could not be 
detected.</exception>
        private string TestEncoding (FileStream fileStream, Encoding encoding, out SubtitleFormat format) {
                /* Get the text */
                string text = TestEncoding(fileStream, encoding);
-               
+
                /* Check the subtitle format */
                format = GetSubtitleFormat(text);
 
                return text;
        }
-               
+
        private string TestEncoding (FileStream fileStream, Encoding encoding) {
                VerboseConsole.WriteLine("Trying the encoding \"" + encoding.WebName + "\"");
                /* Get the text */
                string text = FileInputOutput.ReadFile(fileStream, encoding, true);
-               
+
                return text;
        }
-       
+
        /// <exception cref="UnknownSubtitleFormatException">Thrown if the subtitle format could not be 
detected.</exception>
        private SubtitleFormat GetSubtitleFormat (string text) {
                if (subtitleType == SubtitleType.Unknown)
@@ -199,10 +199,10 @@ internal class SubtitleInput {
 
                SubtitleFormat subtitleFormat = null;
                if (subtitleType == SubtitleType.Unknown)
-                       subtitleFormat = BuiltInSubtitleFormats.Detect(text);   
+                       subtitleFormat = BuiltInSubtitleFormats.Detect(text);
                else
                        subtitleFormat = BuiltInSubtitleFormats.GetFormat(subtitleType);
-                               
+
                return subtitleFormat;
        }
 
diff --git a/src/SubLib/IO/Input/SubtitleParser.cs b/src/SubLib/IO/Input/SubtitleParser.cs
index db1823b..943e86e 100644
--- a/src/SubLib/IO/Input/SubtitleParser.cs
+++ b/src/SubLib/IO/Input/SubtitleParser.cs
@@ -27,17 +27,17 @@ using System.Text;
 using System.Text.RegularExpressions;
 
 namespace SubLib.IO.Input {
- 
+
 internal class SubtitleParser {
        private bool includeIncompleteSubtitles = false;
-       
+
        /* Delegate to use when parsing headers */
        private delegate bool ParseHeaderDelegate (Match match, ParsingProperties properties);
-       
+
        internal SubtitleParser(bool includeIncompleteSubtitles) {
                this.includeIncompleteSubtitles = includeIncompleteSubtitles;
        }
-       
+
        private string ClearComments (string text, SubtitleFormat format) {
                if (format.HasComments) {
                        Regex regex = new Regex(format.Comments);
@@ -47,13 +47,13 @@ internal class SubtitleParser {
                else
                        return text;
        }
-       
+
        /// <summary>Parses the specified text, using the specified format.</summary>
        /// <remarks>The created <see cref="SubtitleCollection" /> will have its <see 
cref="SubtitleProperties" /> property set to null.
        /// It is mandatory to use <see cref="SubtitleCollection.SetPropertiesForAll" /> after.</remarks>
        internal ParsingProperties Parse (string text, SubtitleFormat format, float inputFrameRate,
                        out SubtitleCollection collection, out IncompleteSubtitleCollection 
incompleteSubtitles){
-               
+
                collection = new SubtitleCollection();
                incompleteSubtitles = new IncompleteSubtitleCollection();
                ParsingProperties properties = new ParsingProperties();
@@ -83,27 +83,27 @@ internal class SubtitleParser {
                        bodyIndex = FindBodyIndex(text, format, subtitleRegex);
                        ReadHeaders(text, bodyIndex, format, properties);
                }
-               
+
                /* Get properties from the whole input, if available */
                format.GlobalInputGetProperties(text, properties);
 
                int textLength = text.Length;
-               
+
                /* Read the subtitles */
                bodyIndex = ReadSubtitles(text, bodyIndex, textLength, subtitleRegex, format,
                        properties, collection, incompleteSubtitles);
-               
+
        /* Read the end text of the subtitles */
        bodyIndex = ReadBodyEnd(text, bodyIndex, format, collection, incompleteSubtitles);
-       
+
                /* Check if there's still text remaining */
        if ((bodyIndex < textLength) && includeIncompleteSubtitles)
                AddIncompleteSubtitle(incompleteSubtitles, text.Substring(bodyIndex), collection.Count);
 
        return properties;
        }
-       
-       
+
+
        /* Private members */
 
        private ParseHeaderDelegate GetHeaderParser (SubtitleType subtitleType) {
@@ -131,9 +131,9 @@ internal class SubtitleParser {
        private int ReadHeaders (string text, int bodyIndex, SubtitleFormat format, ParsingProperties 
properties) {
                if (!(format.HasHeaders && (bodyIndex > 0)))
                        return 0;
-       
+
                ParseHeaderDelegate headerParser = GetHeaderParser(format.Type);
-               
+
                int lastIndex = 0; //the last index with header text
                string headerText = text.Substring(0, bodyIndex);
                foreach (string headerExpression in format.Headers) {
@@ -144,7 +144,7 @@ internal class SubtitleParser {
                                int matchLastIndex = match.Index + match.Length;
                                if (matchLastIndex > lastIndex)
                                        lastIndex = matchLastIndex;
-                                       
+
                                headerParser(match, properties);
                        }
                }
@@ -157,7 +157,7 @@ internal class SubtitleParser {
 
        private bool ParseHeaderSubViewer1 (Match match, ParsingProperties properties, Headers headers) {
                string result = String.Empty;
-       
+
                if (ParseGroup(match, "Title", ref result))
                        headers.Title = result;
                else if (ParseGroup(match, "Author", ref result))
@@ -174,14 +174,14 @@ internal class SubtitleParser {
                        headers.CDTrackAsText = result;
                else {
                        return false;
-               }                       
+               }
                return true;
        }
-       
+
        private bool ParseHeaderSubViewer2 (Match match, ParsingProperties properties) {
                Headers headers = properties.Headers;
                string result = String.Empty;
-               
+
                if (!ParseHeaderSubViewer1(match, properties, headers)) {
                        if (ParseGroup(match, "Comment", ref result))
                                headers.Comment = result;
@@ -198,11 +198,11 @@ internal class SubtitleParser {
                }
                return true;
        }
-       
+
        private bool ParseHeaderKaraokeLyricsVKT (Match match, ParsingProperties properties) {
                Headers headers = properties.Headers;
                string result = String.Empty;
-       
+
                if (ParseGroup(match, "FrameRate", ref result))
                        headers.FrameRate = result;
                else if (ParseGroup(match, "Author", ref result))
@@ -213,14 +213,14 @@ internal class SubtitleParser {
                        headers.Date = result;
                else {
                        return false;
-               }                       
+               }
                return true;
        }
-       
+
        private bool ParseHeaderKaraokeLyricsLRC (Match match, ParsingProperties properties) {
                Headers headers = properties.Headers;
                string result = String.Empty;
-       
+
                if (ParseGroup(match, "Title", ref result))
                        headers.Title = result;
                else if (ParseGroup(match, "Author", ref result))
@@ -237,15 +237,15 @@ internal class SubtitleParser {
                        headers.Program = result;
                else {
                        return false;
-               }                       
+               }
                return true;
        }
-       
+
        private bool ParseHeaderMPSub (Match match, ParsingProperties properties) {
                Headers headers = properties.Headers;
                string result = String.Empty;
                float floatResult = 0;
-               
+
                if (ParseGroup(match, "Title", ref result))
                        headers.Title = result;
                else if (ParseGroup(match, "File", ref result))
@@ -266,15 +266,15 @@ internal class SubtitleParser {
                }
                else {
                        return false;
-               }                       
+               }
                return true;
        }
-       
+
        private bool ParseHeaderSubStationAlphaAAS (Match match, ParsingProperties properties) {
                Headers headers = properties.Headers;
                string result = String.Empty;
-               int intResult = 0;              
-               
+               int intResult = 0;
+
                if (ParseGroup(match, "Title", ref result))
                        headers.Title = result;
                else if (ParseGroup(match, "OriginalScript", ref result))
@@ -301,7 +301,7 @@ internal class SubtitleParser {
                        headers.Timer = result;
                else {
                        return false;
-               }                       
+               }
                return true;
        }
 
@@ -316,7 +316,7 @@ internal class SubtitleParser {
                        if (match.Success) {
                        Subtitle subtitle = ParseSubtitle(match, format, properties, previousSubtitle);
                        collection.Add(subtitle);
-                               AddIncompleteSubtitleIfExists(text, match, bodyIndex, collection.Count, 
incompleteSubtitles);                           
+                               AddIncompleteSubtitleIfExists(text, match, bodyIndex, collection.Count, 
incompleteSubtitles);
                        bodyIndex = match.Index + match.Length;
                                previousSubtitle = subtitle;
                        }
@@ -329,9 +329,9 @@ internal class SubtitleParser {
        private Subtitle ParseSubtitle (Match match, SubtitleFormat format, ParsingProperties properties, 
Subtitle previousSubtitle){
                SubtitleText text = ParseSubtitleText(match, format);
                Style style = ParseStyle(match, format);
-       
+
                Subtitle subtitle = new Subtitle(null, text, style);
-       
+
                if (properties.TimingMode == TimingMode.Frames) {
                        Frames previousFrames = (previousSubtitle == null ? null : previousSubtitle.Frames);
                        ParseFrames(match, subtitle.Frames, previousFrames);
@@ -341,19 +341,19 @@ internal class SubtitleParser {
                        ParseTimes(match, subtitle.Times, previousTimes, properties);
                }
 
-               format.SubtitleInputPostProcess(subtitle);      
+               format.SubtitleInputPostProcess(subtitle);
                return subtitle;
        }
-       
+
        private void ParseTimes (Match match, Times times, Times previousTimes, ParsingProperties properties) 
{
                ParseStartTime(match, times, previousTimes, properties);
                ParseEndTime(match, times, previousTimes, properties);
        }
-       
+
        private void ParseStartTime (Match match, Times times, Times previousTimes, ParsingProperties 
properties) {
                bool isTimeDefined = false;
                TimeSpan startTime = new TimeSpan(0);
-               
+
                int result = 0;
                float floatResult = 0;
                if (ParseGroup(match, "StartHours", ref result)) {
@@ -384,22 +384,22 @@ internal class SubtitleParser {
                        startTime += TimingUtil.FramesToTime(result, properties.InputFrameRate);
                        isTimeDefined = true;
                }
-               
+
                if (ParseGroup(match, "StartElapsedTime", ref floatResult)) {
                        if (previousTimes != null)
                                startTime += previousTimes.PreciseEnd;
-                               
+
                        startTime += TimeSpan.FromSeconds(floatResult);
                        isTimeDefined = true;
                }
                if (isTimeDefined)
                        times.PreciseStart = startTime;
        }
-       
+
        private void ParseEndTime (Match match, Times times, Times previousTimes, ParsingProperties 
properties) {
                bool isTimeDefined = false;
                TimeSpan endTime = new TimeSpan(0);
-               
+
                int result = 0;
                float floatResult = 0;
                if (ParseGroup(match, "EndHours", ref result)) {
@@ -437,7 +437,7 @@ internal class SubtitleParser {
                if (isTimeDefined)
                        times.PreciseEnd = endTime;
        }
-       
+
        private void ParseFrames (Match match, Frames frames, Frames previousFrames) {
                int result = 0;
                if (ParseGroup(match, "StartFrame", ref result))
@@ -446,14 +446,14 @@ internal class SubtitleParser {
                        double lastFrames = (previousFrames == null ? 0 : previousFrames.PreciseEnd);
                        frames.PreciseStart = lastFrames + result;
                }
-                       
+
                if (ParseGroup(match, "EndFrame", ref result))
                        frames.PreciseEnd = result;
                else if (ParseGroup(match, "EndElapsedFrames", ref result)) {
                        frames.PreciseDuration = result;
                }
        }
-               
+
        private SubtitleText ParseSubtitleText (Match match, SubtitleFormat subtitleFormat) {
                string text = String.Empty;
                if (ParseGroup(match, "Text", ref text))
@@ -461,7 +461,7 @@ internal class SubtitleParser {
                else
                        return new SubtitleText();
        }
-               
+
        private Style ParseStyle (Match match, SubtitleFormat subtitleFormat) {
                string styleText = String.Empty;
                if (ParseGroup(match, "Style", ref styleText))
@@ -469,7 +469,7 @@ internal class SubtitleParser {
                else
                        return new Style();
        }
-       
+
        private bool ParseGroup (Match match, string groupName, ref string result) {
                Group group = match.Groups[groupName];
                if (group.Success) {
@@ -479,7 +479,7 @@ internal class SubtitleParser {
                else
                        return false;
        }
-       
+
        private bool ParseGroup (Match match, string groupName, ref int result) {
                string textResult = String.Empty;
                bool returnValue = ParseGroup(match, groupName, ref textResult);
@@ -492,7 +492,7 @@ internal class SubtitleParser {
                }
                return returnValue;
        }
-       
+
        private bool ParseGroup (Match match, string groupName, ref float result) {
                string textResult = String.Empty;
                bool returnValue = ParseGroup(match, groupName, ref textResult);
@@ -507,10 +507,10 @@ internal class SubtitleParser {
                }
                return returnValue;
        }
-       
+
     private int ReadBodyEnd (string text, int bodyIndex, SubtitleFormat format,
                SubtitleCollection collection, IncompleteSubtitleCollection incompleteSubtitles) {
-       
+
        Regex bodyEnd = new Regex(format.BodyEndIn + @"\s*", RegexOptions.IgnoreCase);
        Match bodyEndMatch = bodyEnd.Match(text, bodyIndex);
        if (bodyEndMatch.Success) {
@@ -519,26 +519,26 @@ internal class SubtitleParser {
        }
        return bodyIndex;
        }
-       
+
        private bool IsThereIncompleteText (Match match, int bodyIndex) {
                return (match.Index > bodyIndex);
        }
-       
+
        private void AddIncompleteSubtitle (IncompleteSubtitleCollection incompleteSubtitles, string 
incompleteText,
                        int previousSubtitle) {
-               
+
                if (!HasOnlyWhiteSpaces(incompleteText)) {
                        IncompleteSubtitle incompleteSubtitle = new IncompleteSubtitle(previousSubtitle, 
incompleteText);
                        incompleteSubtitles.Add(incompleteSubtitle);
                }
        }
-       
+
        private bool HasOnlyWhiteSpaces (string text) {
                Regex emptyStringExpression = new Regex(@"\s*");
                Match emptyStringMatch = emptyStringExpression.Match(text);
                return (emptyStringMatch.Length == text.Length);
        }
-       
+
        private int FindBodyIndex (string text, SubtitleFormat format, Regex subtitleRegex) {
                if (format.HasHeaders || format.HasBodyBegin) {
                        Match subtitleMatch = subtitleRegex.Match(text);
@@ -548,12 +548,12 @@ internal class SubtitleParser {
                }
                return 0;
        }
-       
+
        private Regex CreateSubtitleRegex(SubtitleFormat format) {
                string subtitleInExpression = format.SubtitleIn + @"\s*"; //Ignore spaces between subtitles
                return new Regex(subtitleInExpression, RegexOptions.IgnoreCase);
        }
-       
+
        // Used when a subtitle format suppports both times and frames
        private Regex CreateSubtitleRegex(SubtitleFormat format, TimingMode timingMode) {
                string subtitleInExpression;
@@ -561,18 +561,18 @@ internal class SubtitleParser {
                        subtitleInExpression = format.SubtitleInTimesMode + @"\s*";   //Ignore spaces between 
subtitles
                else
                        subtitleInExpression = format.SubtitleInFramesMode + @"\s*";  //Ignore spaces between 
subtitles
-       
+
                return new Regex(subtitleInExpression, RegexOptions.IgnoreCase);
        }
-       
+
        private void AddIncompleteSubtitleIfExists (string text, Match match, int bodyIndex,
                int subtitleCount, IncompleteSubtitleCollection incompleteSubtitles) {
-               
+
        if (includeIncompleteSubtitles && IsThereIncompleteText(match, bodyIndex)) {
                int length = match.Index - bodyIndex;
                string incompleteText = text.Substring(bodyIndex, length);
                AddIncompleteSubtitle(incompleteSubtitles, incompleteText, subtitleCount);
-               }               
+               }
     }
 
 }
diff --git a/src/SubLib/IO/Output/SubtitleOutput.cs b/src/SubLib/IO/Output/SubtitleOutput.cs
index a53c63e..39e2493 100644
--- a/src/SubLib/IO/Output/SubtitleOutput.cs
+++ b/src/SubLib/IO/Output/SubtitleOutput.cs
@@ -32,12 +32,12 @@ namespace SubLib.IO.Output {
 internal class SubtitleOutput {
        private SubtitleFormat format = null;
        private SubtitleTextType textType = SubtitleTextType.Text;
-       
+
        private SubtitleProperties subtitleProperties = null;
        private Subtitle subtitle = null;
        private Subtitle previousSubtitle = null;
        private int subtitleNumber = 1;
-       
+
        internal SubtitleOutput (SubtitleFormat format, SubtitleTextType textType) {
                this.format = format;
                this.textType = textType;
@@ -48,11 +48,11 @@ internal class SubtitleOutput {
                StringBuilder output = new StringBuilder();
                if (format.HasHeaders)
                        output.Append(format.HeadersToString(subtitleProperties, fileProperties));
-               
+
                if (format.HasBodyBegin)
                        output.Append(format.BodyBeginOut);
-               
-               string subtitleExpression = GetSubtitleExpression(format, subtitleProperties, 
fileProperties); 
+
+               string subtitleExpression = GetSubtitleExpression(format, subtitleProperties, fileProperties);
                Regex fieldExpression = new Regex(@"<<(?<Field>\w+)(,(?<Width>\d+))?>>");
                MatchEvaluator matchEvaluator = new MatchEvaluator(this.FieldEvaluator);
 
@@ -64,25 +64,25 @@ internal class SubtitleOutput {
                        subtitleNumber++;
                        previousSubtitle = subtitle;
                }
-               
+
                if (format.HasBodyEnd)
                        output.Append(format.BodyEndOut);
-               
+
                subtitle = null;
                previousSubtitle = null;
                subtitleNumber = 1;
-               
+
                ConvertNewlines(output, fileProperties);
                return output.ToString();
        }
 
-       
+
        /* Private members */
 
        private string FieldEvaluator (Match match) {
                Group fieldGroup = match.Groups["Field"];
                string field = fieldGroup.Value;
-               
+
                switch (field) {
                        case "StartFrame":
                                int startFrame = subtitle.Frames.Start;
@@ -180,13 +180,13 @@ internal class SubtitleOutput {
                                return match.Value;
                }
        }
-       
+
        private string FormatedField (int field, int defaultWidth, Match match) {
                Group group = match.Groups["Width"];
                int width = (group.Success ? Convert.ToInt32(group.Value) : defaultWidth);
                return DimensionField(field, width);
        }
-       
+
        private string FormatedField (int field, Match match) {
                Group group = match.Groups["Width"];
                if (group.Success) {
@@ -194,31 +194,31 @@ internal class SubtitleOutput {
                        return DimensionField(field, width);
                }
                else
-                       return field.ToString();        
+                       return field.ToString();
        }
-       
+
        private string FormatedField (double field) {
                return field.ToString("0.###", CultureInfo.InvariantCulture);
        }
-       
+
        //TODO fix precision when saving files. If our number width is greater than 'width', some of the last 
digits will be removed
        private string DimensionField (int field, int width) {
                return field.ToString("D" + width).Substring(0, width);
        }
-       
+
        private int DivideAndRound (int number, int denominator) {
                return (int)Math.Round((double)number / denominator);
        }
-       
+
        private void ConvertNewlines (StringBuilder builder, FileProperties properties) {
                NewlineType type = properties.NewlineType;
                if ((type == NewlineType.Unknown) || (type == NewlineType.Unix))
                        return;
-               
+
                string newline = (type == NewlineType.Windows ? "\r\n" : "\r"); //Windows : Macintosh
                builder.Replace("\n", newline);
        }
-       
+
        private string GetSubtitleExpression (SubtitleFormat format, SubtitleProperties subtitleProperties, 
FileProperties fileProperties) {
                if (format.Mode == SubtitleMode.Both) {
                        if (fileProperties.TimingMode == TimingMode.Times)
@@ -231,9 +231,9 @@ internal class SubtitleOutput {
                                return format.SubtitleOut;
                        else
                                return format.GetDynamicSubtitleOut(subtitleProperties);
-               }       
+               }
        }
-       
+
 }
 
 }
diff --git a/src/SubLib/IO/Output/VerboseConsole.cs b/src/SubLib/IO/Output/VerboseConsole.cs
index e54914a..acc9c3e 100644
--- a/src/SubLib/IO/Output/VerboseConsole.cs
+++ b/src/SubLib/IO/Output/VerboseConsole.cs
@@ -23,17 +23,17 @@ namespace SubLib.IO.Output {
 
 internal class VerboseConsole {
        private static bool verbose = false;
-       
+
        internal static bool Verbose {
                get { return verbose; }
-               set { verbose = value; }        
+               set { verbose = value; }
        }
-       
+
        internal static void Write (string text) {
                if (verbose)
                        Console.Error.Write(text);
        }
-       
+
        internal static void WriteLine (string text) {
                if (verbose)
                        Console.Error.WriteLine(text);
diff --git a/src/SubLib/IO/SubtitleFormats/BuiltInSubtitleFormats.cs 
b/src/SubLib/IO/SubtitleFormats/BuiltInSubtitleFormats.cs
index 1541a36..00d621c 100644
--- a/src/SubLib/IO/SubtitleFormats/BuiltInSubtitleFormats.cs
+++ b/src/SubLib/IO/SubtitleFormats/BuiltInSubtitleFormats.cs
@@ -35,7 +35,7 @@ internal static class BuiltInSubtitleFormats {
                new SubtitleFormatAdvancedSubStationAlpha(),
                new SubtitleFormatMPlayer(),
                new SubtitleFormatMPlayer2(),
-               new SubtitleFormatMPSub(), 
+               new SubtitleFormatMPSub(),
                new SubtitleFormatSubViewer1(),
         new SubtitleFormatSubViewer2(),
                new SubtitleFormatAQTitle(),
@@ -52,18 +52,18 @@ internal static class BuiltInSubtitleFormats {
         new SubtitleFormatAdobeEncoreDVD(),
         new SubtitleFormatFABSubtitler()
        };
-       
+
        internal static SubtitleFormat[] SubtitleFormats {
                get { return subtitleFormats; }
        }
-       
+
        internal static SubtitleFormat GetFormat (SubtitleType subtitleType) {
                if (subtitleType == SubtitleType.Unknown)
                        return null;
                else
-                       return subtitleFormats[(int)subtitleType - 1];  
+                       return subtitleFormats[(int)subtitleType - 1];
        }
-    
+
     internal static SubtitleFormat Detect (string subtitleText) {
        int lengthToTest = Math.Min(subtitleText.Length, 2000); //only use the first 2000 chars
                foreach (SubtitleFormat format in BuiltInSubtitleFormats.SubtitleFormats) {
@@ -73,7 +73,7 @@ internal static class BuiltInSubtitleFormats {
                }
                throw new UnknownSubtitleFormatException();
        }
-    
+
     private static bool TrySubtitleFormat (SubtitleFormat format, string subtitleText, int length) {
                Regex expression = new Regex(format.Format, RegexOptions.IgnoreCase);
                Match match = expression.Match(subtitleText, 0, length);
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormat.cs b/src/SubLib/IO/SubtitleFormats/SubtitleFormat.cs
index d8caf03..184b1c2 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormat.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormat.cs
@@ -31,9 +31,9 @@ internal abstract class SubtitleFormat {
        protected SubtitleType type;    //the subtitle type
        protected SubtitleMode mode;    //the subtitle mode
        protected string[] extensions;  //the extensions used
-       
+
        protected string lineBreak;             //used to split the subtitle's text lines
-       protected string format;                //regex used to detect the file's format                
+       protected string format;                //regex used to detect the file's format
        protected string subtitleIn;    //regex used to read a subtitle
        protected string subtitleOut = null;    //expression with tags used to write a subtitle; 
GetDynamicSubtitleOut can be used instead if the expression is dynamic
 
@@ -43,7 +43,7 @@ internal abstract class SubtitleFormat {
        protected string bodyBeginOut = String.Empty;   //used to write the beginning of the subtitles' body
        protected string bodyEndIn = String.Empty;              //used to detect the end of the subtitles' 
body
        protected string bodyEndOut = String.Empty;             //used to write the end of the subtitles' body
-       
+
        /* Required members for subtitles that support both frames and times */
        //The following two are used instead of subtitleIn
        protected string subtitleInTimesMode = String.Empty;    //regex used to read a subtitle in times mode
@@ -51,15 +51,15 @@ internal abstract class SubtitleFormat {
        //The following two are used instead of subtitleOut
        protected string subtitleOutTimesMode = String.Empty;   //regex used to output a subtitle in times 
mode
        protected string subtitleOutFramesMode = String.Empty;  //regex used to output a subtitle in times 
mode
-       
+
        internal string Name {
                get { return name; }
        }
-               
+
        internal SubtitleType Type {
                get { return type; }
        }
-       
+
        internal SubtitleMode Mode {
                get { return mode; }
        }
@@ -74,23 +74,23 @@ internal abstract class SubtitleFormat {
                                return TimingMode.Times;
                }
        }
-       
+
        internal string[] Extensions {
                get { return extensions; }
        }
-       
+
        internal string LineBreak {
                get { return lineBreak; }
        }
-       
+
        internal string Format {
                get { return format; }
        }
-       
+
        internal string SubtitleIn {
                get { return subtitleIn; }
        }
-       
+
        internal string SubtitleOut {
                get { return subtitleOut; }
        }
@@ -98,35 +98,35 @@ internal abstract class SubtitleFormat {
        internal bool HasHeaders {
                get { return headers != null; }
        }
-       
+
        internal string[] Headers {
                get { return headers; }
        }
-       
+
        internal bool HasComments {
                get { return comments != String.Empty; }
        }
-       
+
        internal string Comments {
                get { return comments; }
        }
-       
+
        internal bool HasBodyBegin {
                get { return bodyBeginOut != String.Empty; }
        }
-       
+
        internal string BodyBeginOut {
                get { return bodyBeginOut; }
        }
-       
+
        internal bool HasBodyEnd {
                get { return bodyEndOut != String.Empty; }
        }
-       
+
        internal string BodyEndIn {
                get { return bodyEndIn; }
        }
-       
+
        internal string BodyEndOut {
                get { return bodyEndOut; }
        }
@@ -134,19 +134,19 @@ internal abstract class SubtitleFormat {
        internal string SubtitleInTimesMode {
                get { return subtitleInTimesMode; }
        }
-       
+
        internal string SubtitleInFramesMode {
                get { return subtitleInFramesMode; }
        }
-       
+
        internal string SubtitleOutTimesMode {
                get { return subtitleOutTimesMode; }
        }
-       
+
        internal string SubtitleOutFramesMode {
                get { return subtitleOutFramesMode; }
        }
-       
+
        internal virtual Style StringToStyle (string styleText) {
                Style style = new Style();
                foreach (char character in styleText) {
@@ -155,27 +155,27 @@ internal abstract class SubtitleFormat {
                        else if ((character == 'b') || (character == 'B'))
                                style.Bold = true;
                        else if ((character == 'i') || (character == 'I'))
-                               style.Italic = true;                                    
+                               style.Italic = true;
                }
                return style;
        }
-       
+
        internal virtual string StyleToString (Style style) {
                return String.Empty;
        }
-       
+
        internal virtual string EndOfStyleToString (Style style) {
                return String.Empty;
        }
-               
+
        internal virtual void SubtitleInputPostProcess (Subtitle subtitle) {
                return;
        }
-       
+
        internal virtual void GlobalInputGetProperties (string text, ParsingProperties properties) {
                return;
        }
-       
+
        internal virtual string GetDynamicSubtitleOut (SubtitleProperties properties) {
                return null;
        }
@@ -183,9 +183,9 @@ internal abstract class SubtitleFormat {
     internal virtual string HeadersToString (SubtitleProperties subtitleProperties, FileProperties 
fileProperties) {
         return String.Empty;
     }
-    
+
        /* Public members */
-       
+
        public override string ToString(){
                return Enum.GetName(typeof(SubtitleType), Type);
        }
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatAQTitle.cs 
b/src/SubLib/IO/SubtitleFormats/SubtitleFormatAQTitle.cs
index 6e35fdf..20c0ed4 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatAQTitle.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatAQTitle.cs
@@ -22,27 +22,27 @@ using System;
 using System.Text.RegularExpressions;
 
 namespace SubLib.IO.SubtitleFormats {
-       
+
 //TODO: support empty lines
 internal class SubtitleFormatAQTitle : SubtitleFormat {
        private static Regex styleExpression = new Regex(@"<[ubi]\w*>", RegexOptions.IgnoreCase);
-       
+
        internal SubtitleFormatAQTitle() {
                name = "AQ Title";
                type = SubtitleType.AQTitle;
                mode = SubtitleMode.Frames;
                extensions = new string[] { "aqt" };
-               
+
                lineBreak = "\n";
-               
+
                format = @"-->>\s*\d+\s+(.+\n)*-->>\s*\d+";
-               
+
                subtitleIn = @"-->>\s*(?<StartFrame>\d+).*\n(?<Text>(.+\n)+)-->>\s*(?<EndFrame>\d+)";
-               
+
                subtitleOut = "-->> <<StartFrame>>\n<<Text>>\n-->> <<EndFrame>>\n";
-               
+
        }
-               
+
        internal override string StyleToString (Style style) {
                string styleText = String.Empty;
                if (style.Underline)
@@ -53,7 +53,7 @@ internal class SubtitleFormatAQTitle : SubtitleFormat {
                        styleText += "<i>";
                return styleText;
        }
-       
+
        // can be optimized
        internal override void SubtitleInputPostProcess (Subtitle subtitle) {
                string subtitleText = subtitle.Text.Get(lineBreak);
@@ -67,7 +67,7 @@ internal class SubtitleFormatAQTitle : SubtitleFormat {
                subtitleText = styleExpression.Replace(subtitleText, String.Empty);
                subtitle.Text.Set(subtitleText, lineBreak, true);       
        }
-               
+
 }
 
 }
\ No newline at end of file
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatAdobeEncoreDVD.cs 
b/src/SubLib/IO/SubtitleFormats/SubtitleFormatAdobeEncoreDVD.cs
index cf1c023..6161ab9 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatAdobeEncoreDVD.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatAdobeEncoreDVD.cs
@@ -27,28 +27,28 @@ namespace SubLib.IO.SubtitleFormats {
 //TODO: warn when saving files with a framerate different than 25 or 29,97.
 internal class SubtitleFormatAdobeEncoreDVD : SubtitleFormat {
        private Regex inputRegexPAL = new Regex(@"\d+(\s*:\s*\d+){3}\s+\d+(\s*:\s*\d+){3}\s*.+");
-       
+
        internal SubtitleFormatAdobeEncoreDVD () {
                name = "Adobe Encore DVD";
                type = SubtitleType.AdobeEncoreDVD;
                mode = SubtitleMode.Times;
                extensions = new string[] { "txt" };
                lineBreak = "\n";
-               
+
                format = @"\d+([:;]\d+){3} +\d+([:;]\d+){3} +.";
-               
+
                subtitleIn = 
@"(\d+\s+)?(?<StartHours>\d+)\s*[:;]\s*(?<StartMinutes>\d+)\s*[:;]\s*(?<StartSeconds>\d+)\s*[:;]\s*(?<StartMillisecondsAsFrames>\d+)\s+(?<EndHours>\d+)\s*[:;]\s*(?<EndMinutes>\d+)\s*[:;]\s*(?<EndSeconds>\d+)\s*[:;]\s*(?<EndMillisecondsAsFrames>\d+)\s+(?<Text>((.(?!(\d+\s+)?\d+(\s*[:;]\s*\d+){3}))*\n)+)";
 
                subtitleOut = null;
        }
-       
+
        internal override string GetDynamicSubtitleOut (SubtitleProperties properties) {
                bool isFrameRatePAL = IsFrameRatePAL(properties.CurrentFrameRate);
                char sep = GetTimingSeparator(isFrameRatePAL);
                string suf = GetFrameRateSuffix(isFrameRatePAL);
                return "<<SubtitleNumber>> <<StartHours>>" + sep + "<<StartMinutes>>" + sep + 
"<<StartSeconds>>" + sep + "<<StartMillisecondsAsFrames" + suf + ">> <<EndHours>>" + sep + "<<EndMinutes>>" + 
sep + "<<EndSeconds>>" + sep + "<<EndMillisecondsAsFrames" + suf + ">> <<Text>>";
        }
-       
+
        internal override void GlobalInputGetProperties (string text, ParsingProperties properties) {
                bool isFrameRatePAL = inputRegexPAL.Match(text).Success;
                float frameRate = (isFrameRatePAL ? 25 : 29.97F);
@@ -60,11 +60,11 @@ internal class SubtitleFormatAdobeEncoreDVD : SubtitleFormat {
        private char GetTimingSeparator (bool isFrameRatePAL) {
                return (isFrameRatePAL ? ':' : ';');
        }
-       
+
        private string GetFrameRateSuffix (bool isFrameRatePAL) {
                return (isFrameRatePAL ? "PAL" : "NTSC");
        }
-       
+
        /// <summary>Returns whether the frame rate is closer to PAL (25) or to NTSC (29.97).</summary>
        private bool IsFrameRatePAL (float frameRate) {
                return (Math.Abs(frameRate - 25) <= Math.Abs(frameRate - 29.97));
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatAdvancedSubStationAlpha.cs 
b/src/SubLib/IO/SubtitleFormats/SubtitleFormatAdvancedSubStationAlpha.cs
index 103e00f..4bbb561 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatAdvancedSubStationAlpha.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatAdvancedSubStationAlpha.cs
@@ -25,40 +25,40 @@ namespace SubLib.IO.SubtitleFormats {
 
 //TODO: check when hours >= 10 (2+ digits)
 internal class SubtitleFormatAdvancedSubStationAlpha : SubtitleFormatSubStationAlpha {
-       
+
        protected override string FormatName {
                get { return "Advanced Sub Station Alpha"; }
        }
-       
+
        protected override SubtitleType FormatType {
                get { return SubtitleType.AdvancedSubStationAlpha; }
        }
-       
+
        protected override string[] FormatExtensions {
                get { return new string[] { "ass" }; }
        }
-       
+
        protected override string FormatBodyBeginOut {
                get { return "[Events]\nFormat: Layer, Start, End, Style, Actor, MarginL, MarginR, MarginV, 
Effect, Text\n"; }
        }
-       
+
        protected override string FormatSubtitleOut {
                get { return "Dialogue: 
0,<<StartHours,1>>:<<StartMinutes>>:<<StartSeconds>>.<<StartCentiseconds>>,<<EndHours,1>>:<<EndMinutes>>:<<EndSeconds>>.<<EndCentiseconds>>,Default,,0000,0000,0000,,<<Style>><<Text>><<EndOfStyle>>";
 }
        }
-       
+
        protected override string ScriptType {
                get { return "v4.00+"; }
        }
-       
+
        protected override string StyleTypeIn {
                get { return @"V4\+"; }
        }
-       
+
        protected override string StyleSection {
                get {
                        return "[V4+ Styles]\nFormat: Name, Fontname, Fontsize, PrimaryColour, 
SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, 
Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding\n" +
                                "Style: 
Default,Tahoma,24,&H00FFFFFF,&H00FFFFFF,&H00FFFFFF,&H00C0C0C0,-1,0,0,0,100,100,0,0.00,1,2,3,2,20,20,20,1\n\n";
-               }       
+               }
        }
 
 }
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatDKSSubtitleFormat.cs 
b/src/SubLib/IO/SubtitleFormats/SubtitleFormatDKSSubtitleFormat.cs
index 41758e8..c1b94fd 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatDKSSubtitleFormat.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatDKSSubtitleFormat.cs
@@ -24,23 +24,23 @@ using System.Text.RegularExpressions;
 namespace SubLib.IO.SubtitleFormats {
 
 internal class SubtitleFormatDKSSubtitleFormat : SubtitleFormat {
-       
+
        internal SubtitleFormatDKSSubtitleFormat () {
                name = "DKS Subtitle Format";
                type = SubtitleType.DKSSubtitleFormat;
                mode = SubtitleMode.Times;
                extensions = new string[] { "dks" };
                lineBreak = "[br]";
-               
+
                format = @"\[\d+:\d+:\d+\]\s*.*\s*\[\d+:\d+:\d+\]";
-               
+
                subtitleIn = 
@"\[\s*(?<StartHours>\d+)\s*:\s*(?<StartMinutes>\d+)\s*:\s*(?<StartSeconds>\d+)\s*\]\s*(?<Text>.*)\s*\[\s*(?<EndHours>\d+)\s*:\s*(?<EndMinutes>\d+)\s*:\s*(?<EndSeconds>\d+)\s*\]";
-               
+
                subtitleOut = "[<<StartHours>>:<<StartMinutes>>:<<StartSeconds>>]<<Text>>\n" +
                        "[<<EndHours>>:<<EndMinutes>>:<<EndSeconds>>]\n";
-               
+
        }
-       
+
 }
 
 }
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatFABSubtitler.cs 
b/src/SubLib/IO/SubtitleFormats/SubtitleFormatFABSubtitler.cs
index f6648f1..59bd4e6 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatFABSubtitler.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatFABSubtitler.cs
@@ -27,18 +27,18 @@ namespace SubLib.IO.SubtitleFormats {
 /* Note: it's not clear whether FAB Subtitler supports framerates besides PAL and NTSC. Because of that, all 
framerates
    are supported here. The user should use the subtitle input and output framerate options accordingly. */
 internal class SubtitleFormatFABSubtitler : SubtitleFormat {
-       
+
        internal SubtitleFormatFABSubtitler () {
                name = "FAB Subtitler";
                type = SubtitleType.FABSubtitler;
                mode = SubtitleMode.Times;
                extensions = new string[] { "txt" };
                lineBreak = "\n";
-               
+
                format = @"\d\d:\d\d:\d\d:\d\d\s+\d\d:\d\d:\d\d:\d\d";
-               
+
                subtitleIn = 
@"(?<StartHours>\d+)\s*:\s*(?<StartMinutes>\d+)\s*:\s*(?<StartSeconds>\d+)\s*:\s*(?<StartMillisecondsAsFrames>\d+)\s+(?<EndHours>\d+)\s*:\s*(?<EndMinutes>\d+)\s*:\s*(?<EndSeconds>\d+)\s*:\s*(?<EndMillisecondsAsFrames>\d+).*(\n(?<Text>(.*(?!\n\d+(\s*:\s*\d+){2})\n?)*.))?";
-               
+
                subtitleOut = "<<StartHours>>:<<StartMinutes>>:<<StartSeconds>>:<<StartMillisecondsAsFrames>> 
 <<EndHours>>:<<EndMinutes>>:<<EndSeconds>>:<<EndMillisecondsAsFrames>>\n<<Text>>\n";;
        }
 
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatKaraokeLyricsLRC.cs 
b/src/SubLib/IO/SubtitleFormats/SubtitleFormatKaraokeLyricsLRC.cs
index c373d9a..f8101ef 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatKaraokeLyricsLRC.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatKaraokeLyricsLRC.cs
@@ -25,22 +25,22 @@ namespace SubLib.IO.SubtitleFormats {
 
 //TODO: warn when saving subtitles with times > 99 minutes, warn when saving with 2+ lines
 internal class SubtitleFormatKaraokeLyricsLRC : SubtitleFormat {
-               
+
        internal SubtitleFormatKaraokeLyricsLRC() {
                name = "Karaoke Lyrics LRC";
                type = SubtitleType.KaraokeLyricsLRC;
                mode = SubtitleMode.Times;
                extensions = new string[] { "lrc" };
-               
+
                lineBreak = "|"; // It does not manage line breaks, but still using this char as a separator
-               
+
                format = @"\[\s*\d+:\d+[.,]\d+\s*\].+\n+\[\s*\d+:\d+[.,]\d+\s*\]";
-               
+
                subtitleIn = 
@"\[\s*(?<StartMinutes>\d+)\s*:\s*(?<StartSeconds>\d+)\s*[.,]\s*(?<StartCentiseconds>\d+)\s*\]\s*(?<Text>.*)\n+\[\s*(?<EndMinutes>\d+)\s*:\s*(?<EndSeconds>\d+)\s*[.,]\s*(?<EndCentiseconds>\d+)\s*\]";
-               
+
                subtitleOut = "[<<StartMinutes>>:<<StartSeconds>>.<<StartCentiseconds>>]<<Text>>\n" +
                        "[<<EndMinutes>>:<<EndSeconds>>.<<EndCentiseconds>>]";
-                       
+
                headers = new string[] {
                @"\[\s*ti:(?<Title>.*)\s*]" ,
                @"\[\s*au:(?<Author>.*)\s*]" ,
@@ -50,9 +50,9 @@ internal class SubtitleFormatKaraokeLyricsLRC : SubtitleFormat {
                @"\[\s*ve:(?<Version>.*)\s*]" ,
                @"\[\s*re:(?<Program>.*)\s*]"
                };
-               
+
        }
-       
+
        internal override string HeadersToString (SubtitleProperties subtitleProperties, FileProperties 
fileProperties) {
                Headers headers = subtitleProperties.Headers;
                return "[ti: " + headers.Title + "]\n" +
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatKaraokeLyricsVKT.cs 
b/src/SubLib/IO/SubtitleFormats/SubtitleFormatKaraokeLyricsVKT.cs
index 2eb269d..6a12f09 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatKaraokeLyricsVKT.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatKaraokeLyricsVKT.cs
@@ -25,33 +25,33 @@ namespace SubLib.IO.SubtitleFormats {
 
 //TODO: warn when saving with 2+ lines
 internal class SubtitleFormatKaraokeLyricsVKT : SubtitleFormat {
-               
+
        internal SubtitleFormatKaraokeLyricsVKT() {
                name = "Karaoke Lyrics VKT";
                type = SubtitleType.KaraokeLyricsVKT;
                mode = SubtitleMode.Frames;
                extensions = new string[] { "vkt" };
-               
+
                lineBreak = "|"; // It does not manage line breaks, but still using this char as a separator
-               
+
                format = @"\{\s*\d+\s*.+\s*\}\n+\{\s*\d+\s*\}";
-               
+
                subtitleIn = @"\{\s*(?<StartFrame>\d+)\s*(?<Text>.+)\}\n+\{\s*(?<EndFrame>\d+)\s*\}";
-               
+
                subtitleOut = "{<<StartFrame>> <<Text>>}\n{<<EndFrame>> }";
-               
+
                bodyEndIn = @"#\s*[\n#]+\s+THE END.";
                bodyEndOut = "#\n# THE END.\n";
-       
+
                headers = new string[] {
                @"FRAME RATE=(?<FrameRate>.*)" ,
                @"CREATOR=(?<Author>.*)" ,
                @"VIDEO SOURCE=(?<Source>.*)" ,
                @"DATE=(?<Date>.*)"
                };
-               
+
        }
-       
+
        internal override string HeadersToString(SubtitleProperties subtitleProperties, FileProperties 
fileProperties) {
                Headers headers = subtitleProperties.Headers;
                return "# <HEAD>\n" +
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatMPSub.cs 
b/src/SubLib/IO/SubtitleFormats/SubtitleFormatMPSub.cs
index ec8c3a6..a098497 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatMPSub.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatMPSub.cs
@@ -24,7 +24,7 @@ namespace SubLib.IO.SubtitleFormats {
 
 //TODO: warn when opening files with comments, warn when saving lines with '#' as they will be 
ignored/treated as comments
 internal class SubtitleFormatMPSub : SubtitleFormat {
-       
+
        internal SubtitleFormatMPSub () {
                name = "MPSub";
                type = SubtitleType.MPSub;
@@ -36,12 +36,12 @@ internal class SubtitleFormatMPSub : SubtitleFormat {
 
                subtitleInTimesMode = 
@"(?<StartElapsedTime>\d+([.,]\d*)?)[^\d\n](?<EndElapsedTime>\d+([.,]\d*)?).*(?<Text>(\n?.*(?!\n[ 
\f\r\t\v]*\n))*.)";
                subtitleInFramesMode = 
@"(?<StartElapsedFrames>\d+)[^\d\n](?<EndElapsedFrames>\d+).*(?<Text>(\n?.*(?!\n[ \f\r\t\v]*\n))*.)";
-               
+
                subtitleOutTimesMode = "<<StartElapsedTime>> <<EndElapsedTime>>\n<<Text>>\n";
                subtitleOutFramesMode = "<<StartElapsedFrames>> <<EndElapsedFrames>>\n<<Text>>\n";
-               
+
                comments = "#.*";
-               
+
                headers = new string[] {
                @"TITLE\s*=(?<Title>.*)" ,
                @"FILE\s*=(?<File>.*)" ,
@@ -63,7 +63,7 @@ internal class SubtitleFormatMPSub : SubtitleFormat {
                        "FORMAT=" + format + "\n" +
                        "NOTE=" + headers.Comment + "\n\n";
        }
-               
+
 }
 
 }
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatMPlayer.cs 
b/src/SubLib/IO/SubtitleFormats/SubtitleFormatMPlayer.cs
index 15e23f7..5740c67 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatMPlayer.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatMPlayer.cs
@@ -23,21 +23,21 @@ using System;
 namespace SubLib.IO.SubtitleFormats {
 
 internal class SubtitleFormatMPlayer : SubtitleFormat {
-       
+
        internal SubtitleFormatMPlayer () {
                name = "MPlayer";
                type = SubtitleType.MPlayer;
                mode = SubtitleMode.Frames;
                extensions = new string[] { "mpl" };
                lineBreak = "|";
-               
+
                format = @"\d+,\d+,\d+,";
-               
+
                subtitleIn = @"(?<StartFrame>\d+)\s*,[^\d\n]*(?<EndFrame>\d+)\s*,[^\d\n]*\d+\s*,(?<Text>.*)";
-               
+
                subtitleOut = "<<StartFrame>>,<<EndFrame>>,0,<<Text>>";
        }
-       
+
 }
 
 }
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatMPlayer2.cs 
b/src/SubLib/IO/SubtitleFormats/SubtitleFormatMPlayer2.cs
index cb63986..e87ee4b 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatMPlayer2.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatMPlayer2.cs
@@ -23,18 +23,18 @@ using System;
 namespace SubLib.IO.SubtitleFormats {
 
 internal class SubtitleFormatMPlayer2 : SubtitleFormat {
-    
+
     internal SubtitleFormatMPlayer2 () {
                name = "MPlayer2";
                type = SubtitleType.MPlayer2;
                mode = SubtitleMode.Times;
        extensions = new string[] { "mpl" };
                lineBreak = "|";
-               
+
                format = @"\[\d+\]\[\d+\]";
-               
+
                subtitleIn = @"\[\s*(?<StartDeciseconds>\d+)\s*\]\[\s*(?<EndDeciseconds>\d+)\s*\](?<Text>.*)";
-               
+
                subtitleOut = "[<<StartTotalDeciseconds>>][<<EndTotalDeciseconds>>]<<Text>>";
        }
 }
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatMacSUB.cs 
b/src/SubLib/IO/SubtitleFormats/SubtitleFormatMacSUB.cs
index cffb8a3..44c1515 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatMacSUB.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatMacSUB.cs
@@ -25,23 +25,23 @@ namespace SubLib.IO.SubtitleFormats {
 
 //TODO: support empty lines
 internal class SubtitleFormatMacSUB : SubtitleFormat {
-       
+
        internal SubtitleFormatMacSUB() {
                name = "MacSUB";
                type = SubtitleType.MacSUB;
                mode = SubtitleMode.Frames;
                extensions = new string[] { "scr" };
-               
+
                lineBreak = "\n";
-               
+
                format = @"/\d+\s+(.+\n)*/\d+";
-               
+
                subtitleIn = @"/\s*(?<StartFrame>\d+)\n+(?<Text>(.*(?!\n/\d+)\n)*.*\n)/\s*(?<EndFrame>\d+)";
-               
+
                subtitleOut = "/<<StartFrame>>\n<<Text>>\n/<<EndFrame>>";
-               
+
        }
-               
+
 }
 
 }
\ No newline at end of file
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatMicroDVD.cs 
b/src/SubLib/IO/SubtitleFormats/SubtitleFormatMicroDVD.cs
index 91be652..3ceab6d 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatMicroDVD.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatMicroDVD.cs
@@ -24,23 +24,23 @@ using System.Text.RegularExpressions;
 namespace SubLib.IO.SubtitleFormats {
 
 internal class SubtitleFormatMicroDVD : SubtitleFormat {
-       
+
        internal SubtitleFormatMicroDVD () {
                name = "Micro DVD";
                type = SubtitleType.MicroDVD;
                mode = SubtitleMode.Frames;
                extensions = new string[] { "sub" };
                lineBreak = "|";
-               
+
                format = @"\{\s*\d+\s*\}\s*\{\s*\d+\s*\}\s*.+";
-               
+
                subtitleIn = 
@"\{[^\d\n]*(?<StartFrame>\d+)[^\}\n]*\}([^\{\n]*\{[^\d\n]*(?<EndFrame>\d+)[^\}\n]*\})?(?<Text>.*)";
-               
+
                subtitleOut = "{<<StartFrame>>}{<<EndFrame>>}<<Style>><<Text>>";
        }
-       
+
        private static Regex styleExpression =  new Regex(@"\{[^Y]*Y[^:]*:\w*\}", RegexOptions.IgnoreCase);
-       
+
        internal override string StyleToString(Style style) {
                string styleText = String.Empty;
                if (style.Enabled) {
@@ -66,9 +66,9 @@ internal class SubtitleFormatMicroDVD : SubtitleFormat {
                Style style = StringToStyle(styleText);
                subtitle.Style = style;
                subtitleText = styleExpression.Replace(subtitleText, String.Empty);
-               subtitle.Text.Set(subtitleText, lineBreak, true);       
+               subtitle.Text.Set(subtitleText, lineBreak, true);
        }
-       
+
 }
 
 }
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatPanimator.cs 
b/src/SubLib/IO/SubtitleFormats/SubtitleFormatPanimator.cs
index 577629c..80513bd 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatPanimator.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatPanimator.cs
@@ -22,26 +22,26 @@ using System;
 using System.Text.RegularExpressions;
 
 namespace SubLib.IO.SubtitleFormats {
-       
+
 internal class SubtitleFormatPanimator : SubtitleFormat {
-               
+
        internal SubtitleFormatPanimator() {
                name = "Panimator";
                type = SubtitleType.Panimator;
                mode = SubtitleMode.Times;
                extensions = new string[] { "pan" };
-               
+
                lineBreak = "\n";
-               
+
                format = @"/d\s+\d+\s+\d+\s+(.+\n)*\s*/d\s+\d+\s+\d+\s+/c";
-               
+
                subtitleIn = @"/d\s+(?<StartSeconds>\d+)\s+(?<StartCentiseconds>\d+)\s+(?<Text>(.*(?!\n[ 
\f\r\t\v]*/d[ \f\r\t\v]+\d+[ \f\r\t\v]+\d+[ \f\r\t\v]*\n[ 
\f\r\t\v]*/c)\n)*.*\n)\s*/d\s+(?<EndSeconds>\d+)\s+(?<EndCentiseconds>\d+)\s+/c";
-               
-               subtitleOut = "/d <<StartSeconds>> <<StartCentiseconds>>\n<<Text>>\n" 
+
+               subtitleOut = "/d <<StartSeconds>> <<StartCentiseconds>>\n<<Text>>\n"
                                + "/d <<EndSeconds>> <<EndCentiseconds>>\n/c";
-               
+
        }
-       
+
 }
 
 }
\ No newline at end of file
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatPhoenixJapanimationSociety.cs 
b/src/SubLib/IO/SubtitleFormats/SubtitleFormatPhoenixJapanimationSociety.cs
index 40ccb6d..15103ef 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatPhoenixJapanimationSociety.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatPhoenixJapanimationSociety.cs
@@ -25,23 +25,23 @@ namespace SubLib.IO.SubtitleFormats {
 
 //TODO: support empty lines
 internal class SubtitleFormatPhoenixJapanimationSociety : SubtitleFormat {
-               
+
        internal SubtitleFormatPhoenixJapanimationSociety() {
                name = "Phoenix Japanimation Society";
                type = SubtitleType.PhoenixJapanimationSociety;
                mode = SubtitleMode.Frames;
                extensions = new string[] { "pjs" };
-               
+
                lineBreak = "|";
-               
+
                format = @"\s*\d+,\s*\d+,\s*"".+""";
-               
+
                subtitleIn = @"\s*(?<StartFrame>\d+),\s*(?<EndFrame>\d+),\s*""(?<Text>.+)""";
-               
+
                subtitleOut = "\t<<StartFrame>>,\t<<EndFrame>>, \"<<Text>>\"";
-               
+
        }
-       
+
 }
 
 }
\ No newline at end of file
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatPowerDivX.cs 
b/src/SubLib/IO/SubtitleFormats/SubtitleFormatPowerDivX.cs
index cb30dc5..e7a60dc 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatPowerDivX.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatPowerDivX.cs
@@ -24,22 +24,22 @@ using System.Text.RegularExpressions;
 namespace SubLib.IO.SubtitleFormats {
 
 internal class SubtitleFormatPowerDivX : SubtitleFormat {
-       
+
        internal SubtitleFormatPowerDivX () {
                name = "Power DivX";
                type = SubtitleType.PowerDivX;
                mode = SubtitleMode.Times;
                extensions = new string[] { "psb" };
                lineBreak = "|";
-               
+
                format = @"\{\s*\d+:\d+:\d+\s*\}\{\s*\d+:\d+:\d+\s*\}\s*.+";
-               
+
                subtitleIn = 
@"\{\s*(?<StartHours>\d+)\s*:\s*(?<StartMinutes>\d+)\s*:\s*(?<StartSeconds>\d+)\s*\}\s*\{\s*(?<EndHours>\d+)\s*:\s*(?<EndMinutes>\d+)\s*:\s*(?<EndSeconds>\d+)\s*\}\s*(?<Text>.*)";
-               
+
                subtitleOut = "{<<StartHours>>:<<StartMinutes>>:<<StartSeconds>>}" +
                        "{<<EndHours>>:<<EndMinutes>>:<<EndSeconds>>}<<Text>>";
        }
-       
+
 }
 
 }
\ No newline at end of file
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatSubCreator1x.cs 
b/src/SubLib/IO/SubtitleFormats/SubtitleFormatSubCreator1x.cs
index ddf7700..f2e7fe3 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatSubCreator1x.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatSubCreator1x.cs
@@ -31,9 +31,9 @@ internal class SubtitleFormatSubCreator1x : SubtitleFormat {
                mode = SubtitleMode.Times;
        extensions = new string[] { "txt" };
                lineBreak = "|";
-                       
+
                format = @"\d+:\d+:\d+[.,]\d:\s*.+\s+\d+:\d+:\d+[.,]\d:";
-               
+
                subtitleIn = 
@"(?<StartHours>\d+):(?<StartMinutes>\d+):(?<StartSeconds>\d+)[.,](?<StartDeciseconds>\d+):\s*(?<Text>.+)\s+(?<EndHours>\d+):(?<EndMinutes>\d+):(?<EndSeconds>\d+)[.,](?<EndDeciseconds>\d+):";
                
                subtitleOut = "<<StartHours>>:<<StartMinutes>>:<<StartSeconds>>.<<StartDeciseconds>>:" +
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatSubRip.cs 
b/src/SubLib/IO/SubtitleFormats/SubtitleFormatSubRip.cs
index cc9b4f0..b6822a3 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatSubRip.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatSubRip.cs
@@ -25,18 +25,18 @@ namespace SubLib.IO.SubtitleFormats {
 
 internal class SubtitleFormatSubRip : SubtitleFormat {
        private static Regex styleExpression = new Regex(@"</?\w*>", RegexOptions.IgnoreCase);
-    
+
     internal SubtitleFormatSubRip () {
                name = "SubRip";
                type = SubtitleType.SubRip;
                mode = SubtitleMode.Times;
        extensions = new string[] { "srt" };
                lineBreak = "\n";
-               
+
                format = @"\d+[ 
\f\r\t\v]*\n\d+(\s*:\s*\d+){2}\s*[,.]\s*\d+\s*-->\s*\d+(\s*:\s*\d+){2}\s*[,.]\d+[ \f\r\t\v]*\n.+"; //Dot is 
here to support buggy SubRip files
 
                subtitleIn = 
@"(\d*[^\n]*\n)?((?<StartHours>\d+)[^\d\n]+)?(?<StartMinutes>\d+)[^\d\n]+(?<StartSeconds>\d+)([^\d\n](?<StartMilliseconds>\d+))?[^\d\n]+((?<EndHours>\d+)[^\d\n]+)?(?<EndMinutes>\d+)[^\d\n]+(?<EndSeconds>\d+)([^\d\n](?<EndMilliseconds>\d+))?[^\d\n]*(\n(?<Text>(.*(?!\n[
 \f\r\t\v]*\d+[ \f\r\t\v]*\n\d+(\s*:\s*\d+){2})\n?)*.))?";
-               
+
                subtitleOut = "<<SubtitleNumber>>\n" +
                        "<<StartHours>>:<<StartMinutes>>:<<StartSeconds>>,<<StartMilliseconds>> --> 
<<EndHours>>:<<EndMinutes>>:<<EndSeconds>>,<<EndMilliseconds>>\n" +
                        "<<Style>><<Text>><<EndOfStyle>>\n";
@@ -52,7 +52,7 @@ internal class SubtitleFormatSubRip : SubtitleFormat {
                        styleText += "<i>";
                return styleText;
        }
-       
+
        internal override string EndOfStyleToString (Style style) {
                string styleText = String.Empty;
                if (style.Underline)
@@ -63,7 +63,7 @@ internal class SubtitleFormatSubRip : SubtitleFormat {
                        styleText += "</i>";
                return styleText;
        }
-       
+
        // can be optimized
        internal override void SubtitleInputPostProcess (Subtitle subtitle) {
                string subtitleText = subtitle.Text.Get(lineBreak);
@@ -75,7 +75,7 @@ internal class SubtitleFormatSubRip : SubtitleFormat {
                Style style = StringToStyle(styleText);
                subtitle.Style = style;
                subtitleText = styleExpression.Replace(subtitleText, String.Empty);
-               subtitle.Text.Set(subtitleText, lineBreak, true);       
+               subtitle.Text.Set(subtitleText, lineBreak, true);
        }
 
 }
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatSubStationAlpha.cs 
b/src/SubLib/IO/SubtitleFormats/SubtitleFormatSubStationAlpha.cs
index 81ee160..acae1da 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatSubStationAlpha.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatSubStationAlpha.cs
@@ -35,12 +35,12 @@ internal class SubtitleFormatSubStationAlpha : SubtitleFormat {
        lineBreak = @"\N";
 
        format = @"\[\s*" + StyleTypeIn + 
@"\s*Styles\s*\][^\[]*\[\s*Events\s*\]\s*Format:\s*[^,\n]*(,[^,\n]*){9}";
-    
+
        subtitleIn = 
@"Dialogue:[^,]*,(?<StartHours>\d+):(?<StartMinutes>\d+):(?<StartSeconds>\d+)\.(?<StartCentiseconds>\d+),(?<EndHours>\d+):(?<EndMinutes>\d+):(?<EndSeconds>\d+)\.(?<EndCentiseconds>\d+)(,[^,]*){6},(?<Text>.*)";
-       
+
        subtitleOut = FormatSubtitleOut;
         bodyBeginOut = FormatBodyBeginOut;
-        
+
                headers = new string[] {
                @"Title:(?<Title>.*)" ,
                @"Original\s*Script:(?<OriginalScript>.*)" ,
@@ -95,25 +95,25 @@ internal class SubtitleFormatSubStationAlpha : SubtitleFormat {
                        Header("Timer:", headers.Timer) + "\n" +
                        StyleSection;
        }
-       
+
        /* Protected members */
-       
+
        protected virtual string FormatName {
                get { return "Sub Station Alpha"; }
        }
-       
+
        protected virtual SubtitleType FormatType {
                get { return SubtitleType.SubStationAlpha; }
        }
-       
+
        protected virtual string[] FormatExtensions {
                get { return new string[] { "ssa" }; }
        }
-       
+
        protected virtual string FormatBodyBeginOut {
                get { return "[Events]\nFormat: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, 
Effect, Text\n"; }
        }
-       
+
        protected virtual string FormatSubtitleOut {
                get { return "Dialogue: 
Marked=0,<<StartHours,1>>:<<StartMinutes>>:<<StartSeconds>>.<<StartCentiseconds>>,<<EndHours,1>>:<<EndMinutes>>:<<EndSeconds>>.<<EndCentiseconds>>,Default,NTP,0000,0000,0000,!Effect,<<Style>><<Text>><<EndOfStyle>>";
 }
        }
@@ -121,13 +121,13 @@ internal class SubtitleFormatSubStationAlpha : SubtitleFormat {
        protected virtual string ScriptType {
                get { return "v4.00"; }
        }
-       
+
        protected virtual string StyleTypeIn {
                get { return "V4"; }
        }
-       
+
        protected virtual string StyleSection {
-               get { 
+               get {
                        return "[V4 Styles]\nFormat: Name, Fontname, Fontsize, PrimaryColour, 
SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, 
MarginR, MarginV, AlphaLevel, Encoding\n" +
                "Style: Default,Tahoma,24,16777215,16777215,16777215,0,-1,0,1,1,1,2,10,10,30,0,0\n\n";
                }
@@ -141,21 +141,21 @@ internal class SubtitleFormatSubStationAlpha : SubtitleFormat {
                else
                        return headerIntro + " " + headerValue + "\n";
        }
-       
+
        private string Header (string headerIntro, string headerValue) {
                if (headerValue == String.Empty)
                        return String.Empty;
                else
                        return headerIntro + " " + headerValue + "\n";
        }
-       
+
        private string Header (string headerIntro, int headerValue) {
                if (headerValue == -1)
                        return String.Empty;
                else
                        return headerIntro + " " + headerValue + "\n";
        }
-       
+
        protected string StyleToString (Style style, string suffix) {
                string styleText = String.Empty;
                if (style.Underline)
@@ -164,7 +164,7 @@ internal class SubtitleFormatSubStationAlpha : SubtitleFormat {
                        styleText += @"{\b" + suffix + "}";
                if (style.Italic)
                        styleText += @"{\i" + suffix + "}";
-               return styleText;       
+               return styleText;
        }
 
 }
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatSubViewer1.cs 
b/src/SubLib/IO/SubtitleFormats/SubtitleFormatSubViewer1.cs
index daf426a..30308ea 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatSubViewer1.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatSubViewer1.cs
@@ -24,27 +24,27 @@ using System.Text.RegularExpressions;
 namespace SubLib.IO.SubtitleFormats {
 
 internal class SubtitleFormatSubViewer1 : SubtitleFormat {
-       
+
        internal SubtitleFormatSubViewer1 () {
                name = "SubViewer 1.0";
                type = SubtitleType.SubViewer1;
                mode = SubtitleMode.Times;
                extensions = new string[] { "sub" };
                lineBreak = "|";
-               
+
                format = @"\**\s*START\s*SCRIPT\s*\**[^\[]*\[\d+:\d+:\d+\]\s*.*\s*\[\d+:\d+:\d+\]";
-               
+
                subtitleIn = 
@"\[\s*(?<StartHours>\d+)\s*:\s*(?<StartMinutes>\d+)\s*:\s*(?<StartSeconds>\d+)\s*\]\s*(?<Text>.*)\s*\[\s*(?<EndHours>\d+)\s*:\s*(?<EndMinutes>\d+)\s*:\s*(?<EndSeconds>\d+)\s*\]";
-               
+
                subtitleOut = "[<<StartHours>>:<<StartMinutes>>:<<StartSeconds>>]\n" +
                        "<<Text>>\n" +
                        "[<<EndHours>>:<<EndMinutes>>:<<EndSeconds>>]\n";
-               
+
                bodyEndIn = @"\[\s*end\s*\]\s*\**\s*END\s*SCRIPT\s*\**";
-               
-               bodyBeginOut = "[BEGIN]\n******** START SCRIPT ********\n";             
+
+               bodyBeginOut = "[BEGIN]\n******** START SCRIPT ********\n";
                bodyEndOut = "[end]\n******** END SCRIPT ********\n";
-               
+
                headers = new string[] {
                @"\[\s*TITLE\s*\].*\n(?<Title>.*)" ,
                @"\[\s*AUTHOR\s*\].*\n(?<Author>.*)" ,
@@ -55,7 +55,7 @@ internal class SubtitleFormatSubViewer1 : SubtitleFormat {
                @"\[\s*CD\s*TRACK\s*\].*\n(?<CdTrack>.*)"
                };
        }
-       
+
        internal override string HeadersToString (SubtitleProperties subtitleProperties, FileProperties 
fileProperties) {
                Headers headers = subtitleProperties.Headers;
                return "[TITLE]\n" + headers.Title + "\n" +
@@ -66,7 +66,7 @@ internal class SubtitleFormatSubViewer1 : SubtitleFormat {
                        "[DELAY]\n" + headers.Delay + "\n" +
                        "[CD TRACK]\n" + headers.CDTrack + "\n";
        }
-       
+
 }
 
 }
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatSubViewer2.cs 
b/src/SubLib/IO/SubtitleFormats/SubtitleFormatSubViewer2.cs
index dcecf04..928eeaa 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatSubViewer2.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatSubViewer2.cs
@@ -24,20 +24,20 @@ using System.Text.RegularExpressions;
 namespace SubLib.IO.SubtitleFormats {
 
 internal class SubtitleFormatSubViewer2 : SubtitleFormat {
-       
+
        internal SubtitleFormatSubViewer2 () {
                name = "SubViewer 2.0";
                type = SubtitleType.SubViewer2;
                mode = SubtitleMode.Times;
                extensions = new string[] { "sub" };
                lineBreak = "[br]";
-               
+
                format = @"\d\d:\d\d:\d\d.\d\d,\d\d:\d\d:\d\d.\d\d";
-               
+
                subtitleIn = 
@"(?<StartHours>\d+)\s*:\s*(?<StartMinutes>\d+)\s*:\s*(?<StartSeconds>\d+)\s*\.\s*(?<StartCentiseconds>\d+)\s*,\s*(?<EndHours>\d+)\s*:\s*(?<EndMinutes>\d+)\s*:\s*(?<EndSeconds>\d+)\s*\.\s*(?<EndCentiseconds>\d+).*\n(?<Text>.*)";
-               
+
                subtitleOut = 
"<<StartHours>>:<<StartMinutes>>:<<StartSeconds>>.<<StartCentiseconds>>,<<EndHours>>:<<EndMinutes>>:<<EndSeconds>>.<<EndCentiseconds>>\n<<Text>>\n";
-               
+
                headers = new string[] {
                @"\[\s*TITLE\s*\](?<Title>.*)" ,
                @"\[\s*AUTHOR\s*\](?<Author>.*)" ,
@@ -53,10 +53,10 @@ internal class SubtitleFormatSubViewer2 : SubtitleFormat {
                @"\[\s*FONT\s*\](?<FontName>[^,\[\n]*)"
                };
        }
-       
+
        internal override string HeadersToString (SubtitleProperties subtitleProperties, FileProperties 
fileProperties) {
                Headers headers = subtitleProperties.Headers;
-               return "[INFORMATION]\n" + 
+               return "[INFORMATION]\n" +
                        "[TITLE]" + headers.Title + "\n" +
                        "[AUTHOR]" + headers.Author + "\n" +
                        "[SOURCE]" + headers.VideoSource + "\n" +
diff --git a/src/SubLib/IO/SubtitleFormats/SubtitleFormatViPlaySubtitleFile.cs 
b/src/SubLib/IO/SubtitleFormats/SubtitleFormatViPlaySubtitleFile.cs
index 4d33beb..a7dbbcb 100644
--- a/src/SubLib/IO/SubtitleFormats/SubtitleFormatViPlaySubtitleFile.cs
+++ b/src/SubLib/IO/SubtitleFormats/SubtitleFormatViPlaySubtitleFile.cs
@@ -25,23 +25,23 @@ namespace SubLib.IO.SubtitleFormats {
 
 internal class SubtitleFormatViPlaySubtitleFile : SubtitleFormat {
        private static Regex styleExpression = new Regex(@"<[ubi]\w*>", RegexOptions.IgnoreCase);
-       
+
        internal SubtitleFormatViPlaySubtitleFile () {
                name = "ViPlay Subtitle File";
                type = SubtitleType.ViPlaySubtitleFile;
                mode = SubtitleMode.Times;
                extensions = new string[] { "vsf" };
                lineBreak = "|";
-               
+
                format = @"\{\* VIPLAY SUBTITLE FILE \*\}\s*\d+:\d+:\d+[,.]\d+\s*-\s*\d+:\d+:\d+[,.]\d+=.+";
-               
+
                subtitleIn = 
@"(?<StartHours>\d+)\s*:\s*(?<StartMinutes>\d+)\s*:\s*(?<StartSeconds>\d+)\s*[,.]\s*(?<StartMilliseconds>\d+)\s*-\s*(?<EndHours>\d+)\s*:\s*(?<EndMinutes>\d+)\s*:\s*(?<EndSeconds>\d+)\s*[,.]\s*(?<EndMilliseconds>\d+)\s*=\s*(?<Text>.*)";
-               
+
                subtitleOut = "<<StartHours>>:<<StartMinutes>>:<<StartSeconds>>,<<StartMilliseconds>>-" +
                        "<<EndHours>>:<<EndMinutes>>:<<EndSeconds>>,<<EndMilliseconds>>=<<Text>>";
-               
-               bodyBeginOut = "{* VIPLAY SUBTITLE FILE *}\n";  
-                       
+
+               bodyBeginOut = "{* VIPLAY SUBTITLE FILE *}\n";
+
        }
                
        internal override string StyleToString (Style style) {
@@ -54,7 +54,7 @@ internal class SubtitleFormatViPlaySubtitleFile : SubtitleFormat {
                        styleText += "<i>";
                return styleText;
        }
-       
+
        // can be optimized
        internal override void SubtitleInputPostProcess (Subtitle subtitle) {
                string subtitleText = subtitle.Text.Get(lineBreak);
@@ -68,7 +68,7 @@ internal class SubtitleFormatViPlaySubtitleFile : SubtitleFormat {
                subtitleText = styleExpression.Replace(subtitleText, String.Empty);
                subtitle.Text.Set(subtitleText, lineBreak, true);       
        }
-               
+
 }
-       
+
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]