=== modified file 'src/extension/implementation/script.cpp'
--- src/extension/implementation/script.cpp	2016-02-09 02:13:32 +0000
+++ src/extension/implementation/script.cpp	2016-03-12 13:32:20 +0000
@@ -152,7 +152,7 @@
 }
 
 /**
- *   brief     Destructor
+ *   \brief     Destructor
  */
 Script::~Script()
 {
@@ -232,11 +232,7 @@
 
     //Don't search when it is an absolute path. */
     if (Glib::path_is_absolute(command)) {
-        if (Glib::file_test(command, Glib::FILE_TEST_EXISTS)) {
-            return true;
-        } else {
-            return false;
-        }
+        return Glib::file_test(command, Glib::FILE_TEST_EXISTS);
     }
 
     // First search in the current directory
@@ -280,9 +276,9 @@
 
 /**
     \return   none
-    \brief    This function 'loads' an extention, basically it determines
-              the full command for the extention and stores that.
-    \param    module  The extention to be loaded.
+    \brief    This function 'loads' an extension, basically it determines
+              the full command for the extension and stores that.
+    \param    module  The extension to be loaded.
 
     The most difficult part about this function is finding the actual
     command through all of the Reprs.  Basically it is hidden down a
@@ -292,7 +288,7 @@
 
     At that point all of the loops are exited, and there is an
     if statement to make sure they didn't exit because of not finding
-    the command.  If that's the case, the extention doesn't get loaded
+    the command.  If that's the case, the extension doesn't get loaded
     and should error out at a higher level.
 */
 
@@ -545,17 +541,17 @@
 
 /**
     \return   none
-    \brief    This function uses an extention to save a document.  It first
+    \brief    This function uses an extension to save a document.  It first
               creates an SVG file of the document, and then runs it through
               the script.
-    \param    module    Extention to be used
+    \param    module    Extension to be used
     \param    doc       Document to be saved
     \param    filename  The name to save the final file as
     \return   false in case of any failure writing the file, otherwise true
 
     Well, at some point people need to save - it is really what makes
     the entire application useful.  And, it is possible that someone
-    would want to use an extetion for this, so we need a function to
+    would want to use an extension for this, so we need a function to
     do that eh?
 
     First things first, the document is saved to a temporary file that
@@ -563,7 +559,7 @@
     ink_ext_ as a prefix.  Don't worry, this file gets deleted at the
     end of the function.
 
-    After we have the SVG file, then extention_execute is called with
+    After we have the SVG file, then Script::execute is called with
     the temporary file name and the final output filename.  This should
     put the output of the script into the final output file.  We then
     delete the temporary file.
@@ -612,7 +608,7 @@
     // FIXME: convert to utf8 (from "filename encoding") and unlink_utf8name
     unlink(tempfilename_in.c_str());
 
-    if (success == false) {
+    if (!success) {
         throw Inkscape::Extension::Output::save_failed();
     }
 
@@ -623,8 +619,8 @@
 
 /**
     \return    none
-    \brief     This function uses an extention as a effect on a document.
-    \param     module   Extention to effect with.
+    \brief     This function uses an extension as a effect on a document.
+    \param     module   Extension to effect with.
     \param     doc      Document to run through the effect.
 
     This function is a little bit trickier than the previous two.  It
@@ -711,7 +707,7 @@
         }
     }
     
-    if(tool){
+    if(tool) {
         Inkscape::UI::ControlPointSelection *cps = tool->_selected_nodes;
         for (Inkscape::UI::ControlPointSelection::iterator i = cps->begin(); i != cps->end(); ++i) {
             Inkscape::UI::Node *node = dynamic_cast<Inkscape::UI::Node*>(*i);
@@ -1123,8 +1119,45 @@
 }
 
 
-
-
+    void Script::file_listener::init(int fd, Glib::RefPtr<Glib::MainLoop> main) {
+        _channel = Glib::IOChannel::create_from_fd(fd);
+        _channel->set_encoding();
+        _conn = main->get_context()->signal_io().connect(sigc::mem_fun(*this, &file_listener::read), _channel, Glib::IO_IN | Glib::IO_HUP | Glib::IO_ERR);
+        _main_loop = main;
+
+        return;
+    }
+
+    bool Script::file_listener::read(Glib::IOCondition condition) {
+        if (condition != Glib::IO_IN) {
+            _main_loop->quit();
+            return false;
+        }
+
+        Glib::IOStatus status;
+        Glib::ustring out;
+        status = _channel->read_line(out);
+        _string += out;
+
+        if (status != Glib::IO_STATUS_NORMAL) {
+            _main_loop->quit();
+            _dead = true;
+            return false;
+        }
+
+        return true;
+    }
+
+    bool Script::file_listener::toFile(const Glib::ustring &name) {
+        try {
+            Glib::RefPtr<Glib::IOChannel> stdout_file = Glib::IOChannel::create_from_file(name, "w");
+            stdout_file->set_encoding();
+            stdout_file->write(_string);
+        } catch (Glib::FileError &e) {
+            return false;
+        }
+        return true;
+    }
 }  // namespace Implementation
 }  // namespace Extension
 }  // namespace Inkscape

=== modified file 'src/extension/implementation/script.h'
--- src/extension/implementation/script.h	2015-04-27 16:01:19 +0000
+++ src/extension/implementation/script.h	2016-03-12 11:44:51 +0000
@@ -86,48 +86,13 @@
 
         bool isDead () { return _dead; }
 
-        // TODO move these definitions into script.cpp
-        void init (int fd, Glib::RefPtr<Glib::MainLoop> main) {
-            _channel = Glib::IOChannel::create_from_fd(fd);
-            _channel->set_encoding();
-            _conn = main->get_context()->signal_io().connect(sigc::mem_fun(*this, &file_listener::read), _channel, Glib::IO_IN | Glib::IO_HUP | Glib::IO_ERR);
-            _main_loop = main;
-
-            return;
-        };
-
-        bool read (Glib::IOCondition condition) {
-            if (condition != Glib::IO_IN) {
-                _main_loop->quit();
-                return false;
-            }
-
-            Glib::IOStatus status;
-            Glib::ustring out;
-            status = _channel->read_line(out);
-            _string += out;
-
-            if (status != Glib::IO_STATUS_NORMAL) {
-                _main_loop->quit();
-                _dead = true;
-                return false;
-            }
-
-            return true;
-        };
+        void init(int fd, Glib::RefPtr<Glib::MainLoop> main);
+
+        bool read(Glib::IOCondition condition);
 
         Glib::ustring string (void) { return _string; };
 
-        bool toFile (const Glib::ustring &name) {
-            try {
-            Glib::RefPtr<Glib::IOChannel> stdout_file = Glib::IOChannel::create_from_file(name, "w");
-            stdout_file->set_encoding();
-            stdout_file->write(_string);
-            } catch (Glib::FileError &e) {
-                return false;
-            }
-            return true;
-        };
+        bool toFile(const Glib::ustring &name);
     };
 
     int execute (const std::list<std::string> &in_command,

=== modified file 'src/extension/init.cpp'
--- src/extension/init.cpp	2014-06-26 19:40:39 +0000
+++ src/extension/init.cpp	2016-03-12 11:03:13 +0000
@@ -1,6 +1,6 @@
 /*
  * This is what gets executed to initialize all of the modules.  For
- * the internal modules this invovles executing their initialization
+ * the internal modules this involves executing their initialization
  * functions, for external ones it involves reading their .spmodule
  * files and bringing them into Sodipodi.
  *

