[gimp-tiny-fu] Updated using Script-Fu scripts from git master of GIMP as of commit 262cc1c9



commit 1574117b1caecea5363aad59a039b6ea4671ebef
Author: Kevin Cozens <kcozens svn gnome org>
Date:   Fri Nov 18 20:07:01 2011 -0500

    Updated using Script-Fu scripts from git master of GIMP as of commit 262cc1c9

 po/POTFILES.in                      |   3 +-
 scripts/3d-outline.scm              |  64 ++++----
 scripts/3dTruchet.scm               |  27 ++--
 scripts/Makefile.am                 |  10 +-
 scripts/add-bevel.scm               |  43 +++---
 scripts/addborder.scm               |  59 +++-----
 scripts/alien-glow-arrow.scm        |  24 +--
 scripts/alien-glow-bar.scm          |  26 ++--
 scripts/alien-glow-bullet.scm       |  29 ++--
 scripts/alien-glow-button.scm       |  30 ++--
 scripts/alien-glow-logo.scm         |   8 +-
 scripts/alien-neon-logo.scm         |  19 ++-
 scripts/basic1-logo.scm             |   8 +-
 scripts/basic2-logo.scm             |  11 +-
 scripts/beveled-button.scm          |  27 ++--
 scripts/beveled-pattern-arrow.scm   |  28 ++--
 scripts/beveled-pattern-bullet.scm  |  24 +--
 scripts/beveled-pattern-button.scm  |  22 +--
 scripts/beveled-pattern-heading.scm |  24 +--
 scripts/beveled-pattern-hrule.scm   |  22 +--
 scripts/blend-anim.scm              |  50 +++----
 scripts/blended-logo.scm            |  20 ++-
 scripts/bovinated-logo.scm          |  15 +-
 scripts/burn-in-anim.scm            |  71 ++++-----
 scripts/camo.scm                    |  31 ++--
 scripts/carve-it.scm                |  37 ++---
 scripts/carved-logo.scm             |  33 +++--
 scripts/chalk.scm                   |  32 ++--
 scripts/chip-away.scm               |  29 ++--
 scripts/chrome-it.scm               |  75 +++++-----
 scripts/chrome-logo.scm             |  30 ++--
 scripts/circuit.scm                 |  46 +++---
 scripts/clothify.scm                |   8 +-
 scripts/coffee.scm                  |  19 +--
 scripts/comic-logo.scm              |  17 +--
 scripts/contactsheet.scm            |  76 +++++-----
 scripts/coolmetal-logo.scm          |  43 +++---
 scripts/crystal-logo.scm            |  31 ++--
 scripts/difference-clouds.scm       |  11 +-
 scripts/distress-selection.scm      | 111 +++++++-------
 scripts/drop-shadow.scm             |  21 +--
 scripts/erase-rows.scm              |   8 +-
 scripts/flatland.scm                |  15 +-
 scripts/font-map.scm                |   6 +-
 scripts/frosty-logo.scm             | 134 ++++++++++++-----
 scripts/fuzzyborder.scm             |  41 +++--
 scripts/gimp-online.scm             |  81 +++++-----
 scripts/glossy.scm                  |  33 ++---
 scripts/glowing-logo.scm            |  24 +--
 scripts/gradient-bevel-logo.scm     |  15 +-
 scripts/gradient-example.scm        |   9 +-
 scripts/grid-system.scm             |   4 +-
 scripts/guides-from-selection.scm   |   2 +-
 scripts/guides-new-percent.scm      |   2 +-
 scripts/guides-new.scm              |   2 +-
 scripts/guides-remove-all.scm       |   2 +-
 scripts/i26-gunya2.scm              |  11 +-
 scripts/land.scm                    |  53 +++----
 scripts/lava.scm                    |  30 ++--
 scripts/line-nova.scm               |  32 ++--
 scripts/mkbrush.scm                 |  50 ++++---
 scripts/neon-logo.scm               | 191 ++++++++++++------------
 scripts/news-text.scm               |  16 +-
 scripts/old-photo.scm               |  17 +--
 scripts/paste-as-brush.scm          |   7 +-
 scripts/paste-as-pattern.scm        |   7 +-
 scripts/perspective-shadow.scm      | 288 ++++++++++++++++++------------------
 scripts/plug-in-compat.init         |  24 +++
 scripts/predator.scm                |  36 ++---
 scripts/pupi-button.scm             |  26 ++--
 scripts/rendermap.scm               |  17 +--
 scripts/reverse-layers.scm          |  22 ++-
 scripts/ripply-anim.scm             |  30 ++--
 scripts/round-corners.scm           |  37 ++---
 scripts/script-fu-compat.init       |  38 ++---
 scripts/script-fu-set-cmap.scm      |  11 +-
 scripts/script-fu-util-setpt.scm    |   7 +-
 scripts/script-fu-util.scm          |  21 ++-
 scripts/script-fu.init              | 211 +++++++++++++++++++++-----
 scripts/select-to-brush.scm         |  28 ++--
 scripts/select-to-image.scm         |  20 +--
 scripts/select-to-pattern.scm       |  29 ++--
 scripts/selection-round.scm         | 189 +++++++++++------------
 scripts/slide.scm                   |  44 +++---
 scripts/sota-chrome-logo.scm        |  43 +++---
 scripts/speed-text.scm              |  22 +--
 scripts/spinning-globe.scm          |  13 +-
 scripts/spyrogimp.scm               |  41 +++--
 scripts/starscape-logo.scm          |  39 +----
 scripts/swirltile.scm               |   6 +-
 scripts/swirly-pattern.scm          |  22 +--
 scripts/t-o-p-logo.scm              |  29 ++--
 scripts/test-sphere.scm             |  23 +--
 scripts/text-circle.scm             |  47 +++---
 scripts/textured-logo.scm           |  18 +--
 scripts/tileblur.scm                |  17 ++-
 scripts/title-header.scm            |  35 ++---
 scripts/truchet.scm                 |  40 +++--
 scripts/ts-helloworld.scm           |   9 +-
 scripts/unsharp-mask.scm            |  36 ++---
 scripts/waves-anim.scm              |  13 +-
 scripts/weave.scm                   |  54 ++++---
 scripts/xach-effect.scm             |  40 ++---
 103 files changed, 1976 insertions(+), 1755 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index f8eba85..24c42ed 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -53,6 +53,7 @@ scripts/flatland.scm
 scripts/font-map.scm
 scripts/frosty-logo.scm
 scripts/fuzzyborder.scm
+scripts/gimp-online.scm
 scripts/glossy.scm
 scripts/glowing-logo.scm
 scripts/gradient-bevel-logo.scm
@@ -80,6 +81,7 @@ scripts/reverse-layers.scm
 scripts/ripply-anim.scm
 scripts/round-corners.scm
 scripts/script-fu-set-cmap.scm
+scripts/script-fu-util.scm
 scripts/selection-round.scm
 scripts/select-to-brush.scm
 scripts/select-to-image.scm
@@ -104,5 +106,4 @@ scripts/truchet.scm
 scripts/unsharp-mask.scm
 scripts/waves-anim.scm
 scripts/weave.scm
-scripts/web-browser.scm
 scripts/xach-effect.scm
diff --git a/scripts/3d-outline.scm b/scripts/3d-outline.scm
index 595a4a5..db3cf7f 100644
--- a/scripts/3d-outline.scm
+++ b/scripts/3d-outline.scm
@@ -7,9 +7,9 @@
 ; 3d-outline creates outlined border of a text with patterns
 ; Copyright (C) 1998 Hrvoje Horvat
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -18,8 +18,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 (define (apply-3d-outline-logo-effect img
                                       logo-layer
@@ -35,59 +34,62 @@
         (height (car (gimp-drawable-height logo-layer)))
         (bg-layer (car (gimp-layer-new img width height
                                        RGB-IMAGE "Background" 100 NORMAL-MODE)))
-        (pattern (car (gimp-layer-new img width height
-                                      RGBA-IMAGE "Pattern" 100 NORMAL-MODE)))
-        (layer2)
-        (layer3)
-        (pattern-mask)
-        (floating-sel)
+        (pattern-layer (car (gimp-layer-new img width height
+                                       RGBA-IMAGE "Pattern" 100 NORMAL-MODE)))
+        (alpha-layer 0)
+        (shadow-layer 0)
+        (pattern-mask 0)
+        (floating-sel 0)
         )
 
     (gimp-context-push)
 
     (gimp-selection-none img)
     (script-fu-util-image-resize-from-layer img logo-layer)
-    (gimp-image-add-layer img pattern 1)
-    (gimp-image-add-layer img bg-layer 2)
+    (script-fu-util-image-add-layers img pattern-layer bg-layer)
     (gimp-context-set-background '(255 255 255))
     (gimp-edit-fill bg-layer BACKGROUND-FILL)
-    (gimp-edit-clear pattern)
+    (gimp-edit-clear pattern-layer)
     (gimp-layer-set-lock-alpha logo-layer TRUE)
     (gimp-context-set-foreground '(0 0 0))
     (gimp-edit-fill logo-layer FOREGROUND-FILL)
     (gimp-layer-set-lock-alpha logo-layer FALSE)
     (plug-in-gauss-iir RUN-NONINTERACTIVE img logo-layer outline-blur-radius TRUE TRUE)
 
-    (gimp-drawable-set-visible pattern FALSE)
-    (set! layer2 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
-    (plug-in-edge RUN-NONINTERACTIVE img layer2 2 1 0)
-    (set! layer3 (car (gimp-layer-copy layer2 TRUE)))
-    (gimp-image-add-layer img layer3 2)
-    (plug-in-gauss-iir RUN-NONINTERACTIVE img layer2 bump-map-blur-radius TRUE TRUE)
+    (gimp-item-set-visible pattern-layer FALSE)
+    (set! alpha-layer (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
+    (plug-in-edge RUN-NONINTERACTIVE img alpha-layer 2 1 0)
+    (gimp-item-set-name alpha-layer "Bump map")
+    (set! shadow-layer (car (gimp-layer-copy alpha-layer TRUE)))
+    (gimp-item-set-name shadow-layer "Edges")
+    (script-fu-util-image-add-layers img shadow-layer)
+    (plug-in-gauss-iir RUN-NONINTERACTIVE img alpha-layer bump-map-blur-radius TRUE TRUE)
 
     (gimp-selection-all img)
     (gimp-context-set-pattern text-pattern)
-    (gimp-edit-bucket-fill pattern
+    (gimp-edit-bucket-fill pattern-layer
                            PATTERN-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
-    (plug-in-bump-map noninteractive img pattern layer2
+    (plug-in-bump-map noninteractive img pattern-layer alpha-layer
                       110.0 45.0 4 0 0 0 0 TRUE FALSE 0)
 
-    (set! pattern-mask (car (gimp-layer-create-mask pattern ADD-ALPHA-MASK)))
-    (gimp-layer-add-mask pattern pattern-mask)
+    (set! pattern-mask (car (gimp-layer-create-mask pattern-layer ADD-ALPHA-MASK)))
+    (gimp-layer-add-mask pattern-layer pattern-mask)
 
     (gimp-selection-all img)
-    (gimp-edit-copy layer3)
+    (gimp-edit-copy shadow-layer)
     (set! floating-sel (car (gimp-edit-paste pattern-mask FALSE)))
     (gimp-floating-sel-anchor floating-sel)
 
-    (gimp-layer-remove-mask pattern MASK-APPLY)
-    (gimp-invert layer3)
-    (plug-in-gauss-iir RUN-NONINTERACTIVE img layer3 shadow-blur-radius TRUE TRUE)
+    (gimp-layer-remove-mask pattern-layer MASK-APPLY)
+    (gimp-invert shadow-layer)
+    (gimp-item-set-name shadow-layer "Drop shadow")
+    (plug-in-gauss-iir RUN-NONINTERACTIVE img shadow-layer shadow-blur-radius TRUE TRUE)
 
-    (gimp-drawable-offset layer3 0 1 s-offset-x s-offset-y)
+    (gimp-drawable-offset shadow-layer
+                          FALSE OFFSET-BACKGROUND s-offset-x s-offset-y)
 
-    (gimp-drawable-set-visible layer2 FALSE)
-    (gimp-drawable-set-visible pattern TRUE)
+    (gimp-item-set-visible alpha-layer FALSE)
+    (gimp-item-set-visible pattern-layer TRUE)
     ;;(set! final (car (gimp-image-flatten img)))
 
     (gimp-context-pop)
@@ -180,4 +182,4 @@
 )
 
 (script-fu-menu-register "script-fu-3d-outline-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/3dTruchet.scm b/scripts/3dTruchet.scm
index 333c76e..afbf64b 100644
--- a/scripts/3dTruchet.scm
+++ b/scripts/3dTruchet.scm
@@ -1,9 +1,9 @@
 ; GIMP - The GNU Image Manipulation Program
 ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -12,8 +12,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;
 ;    3dTruchet  - a script to create Truchet patterns
 ;                 by Adrian Likins <aklikins eos ncsu edu>
@@ -34,8 +33,12 @@
                         aa
                         feather
                         frad)
-  (gimp-ellipse-select img (- cx rx) (- cy ry) (+ rx rx) (+ ry ry)
-                       op aa feather frad)
+  (gimp-context-push)
+  (gimp-context-set-antialias aa)
+  (gimp-context-set-feather feather)
+  (gimp-context-set-feather-radius frad frad)
+  (gimp-image-select-ellipse img op (- cx rx) (- cy ry) (+ rx rx) (+ ry ry))
+  (gimp-context-pop)
 )
 
 (define (use-tile img
@@ -85,8 +88,8 @@
           )
 
       (gimp-image-undo-disable temp-img)
-      (gimp-image-add-layer temp-img temp-draw 0)
-      (gimp-image-add-layer temp-img temp-draw2 0)
+      (gimp-image-insert-layer temp-img temp-draw 0 0)
+      (gimp-image-insert-layer temp-img temp-draw2 0 0)
       (gimp-context-set-background backcolor)
       (gimp-edit-fill temp-draw BACKGROUND-FILL)
       (gimp-edit-fill temp-draw2 BACKGROUND-FILL)
@@ -182,9 +185,9 @@
     (gimp-image-undo-disable img)
     (gimp-image-undo-disable tile)
 
-    (gimp-image-add-layer img layer-one 0)
-    (gimp-image-add-layer tile tiledraw1 0)
-    (gimp-image-add-layer tile tiledraw2 0)
+    (gimp-image-insert-layer img layer-one 0 0)
+    (gimp-image-insert-layer tile tiledraw1 0 0)
+    (gimp-image-insert-layer tile tiledraw2 0 0)
 
     ;just to look a little better
     (gimp-selection-all img)
@@ -236,4 +239,4 @@
 )
 
 (script-fu-menu-register "script-fu-3dtruchet"
-                         "<Toolbox>/Xtns/Patterns")
+                         "<Image>/File/Create/Patterns")
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 8f4f940..7f288e4 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -34,8 +34,8 @@ scripts = \
        bovinated-logo.scm              \
        burn-in-anim.scm                \
        camo.scm                        \
-       carve-it.scm                    \
        carved-logo.scm                 \
+       carve-it.scm                    \
        chalk.scm                       \
        chip-away.scm                   \
        chrome-it.scm                   \
@@ -61,8 +61,8 @@ scripts = \
        gradient-example.scm            \
        grid-system.scm                 \
        guides-from-selection.scm       \
-       guides-new.scm                  \
        guides-new-percent.scm          \
+       guides-new.scm                  \
        guides-remove-all.scm           \
        i26-gunya2.scm                  \
        land.scm                        \
@@ -83,10 +83,10 @@ scripts = \
        round-corners.scm               \
        script-fu-set-cmap.scm          \
        script-fu-util.scm              \
+       selection-round.scm             \
        select-to-brush.scm             \
        select-to-image.scm             \
        select-to-pattern.scm           \
-       selection-round.scm             \
        slide.scm                       \
        sota-chrome-logo.scm            \
        speed-text.scm                  \
@@ -97,11 +97,11 @@ scripts = \
        starscape-logo.scm              \
        swirltile.scm                   \
        swirly-pattern.scm              \
-       t-o-p-logo.scm                  \
        text-circle.scm                 \
        textured-logo.scm               \
-       title-header.scm                \
        tileblur.scm                    \
+       title-header.scm                \
+       t-o-p-logo.scm                  \
        truchet.scm                     \
        unsharp-mask.scm                \
        waves-anim.scm                  \
diff --git a/scripts/add-bevel.scm b/scripts/add-bevel.scm
index d6ab2c1..501c87f 100644
--- a/scripts/add-bevel.scm
+++ b/scripts/add-bevel.scm
@@ -4,9 +4,9 @@
 ; add-bevel.scm version 1.04
 ; Time-stamp: <2004-02-09 17:07:06 simon>
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -15,8 +15,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;
 ; Copyright (C) 1997 Andrew Donkin  (ard cs waikato ac nz)
 ; Contains code from add-shadow.scm by Sven Neumann
@@ -27,7 +26,7 @@
 ; If there is a selection, it is bevelled.
 ; Otherwise if there is an alpha channel, the selection is taken from it
 ; and bevelled.
-; Otherwise the whole image is bevelled.
+; Otherwise the part of the layer inside the image boundries is bevelled.
 ;
 ; The selection is set on exit, so Select->Invert then Edit->Clear will
 ; leave a cut-out.  Then use Sven's add-shadow for that
@@ -46,6 +45,10 @@
 ; 1.04: Fixed undo handling, ensure that bumpmap is big enough,
 ;       (instead of resizing the image). Removed references to outdated
 ;       bumpmap plugin.     (Simon)
+; 1.05  When there is no selection, bevel the whole layer instead of the
+;       whole image (which was broken in the first place).
+;       Also fixed some bugs with setting the selection when there is no
+;       initial selection.     (Barak Itkin)
 ;
 
 (define (script-fu-add-bevel img
@@ -56,7 +59,6 @@
 
   (let* (
         (index 1)
-        (bevelling-whole-image FALSE)
         (greyness 0)
         (thickness (abs thickness))
         (type (car (gimp-drawable-type-with-alpha drawable)))
@@ -71,13 +73,16 @@
                                          (+ width 2)
                                          (+ height 2)
                                          RGB-IMAGE
-                                         "Bumpmap"
+                                         _"Bumpmap"
                                          100
                                          NORMAL-MODE)))
-        (select)
+
+        (selection-exists (car (gimp-selection-bounds image)))
+        (selection 0)
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     ; disable undo on copy, start group otherwise
     (if (= work-on-copy TRUE)
@@ -85,7 +90,7 @@
       (gimp-image-undo-group-start image)
     )
 
-    (gimp-image-add-layer image bump-layer 1)
+    (gimp-image-insert-layer image bump-layer 0 1)
 
     ; If the layer we're bevelling is offset from the image's origin, we
     ; have to do the same to the bumpmap
@@ -96,18 +101,12 @@
     ;
     ; Set the selection to the area we want to bevel.
     ;
-    (if (eq? 0 (car (gimp-selection-bounds image)))
-        (begin
-          (set! bevelling-whole-image TRUE) ; ...so we can restore things properly, and crop.
-          (if (= 1 (car (gimp-drawable-has-alpha pic-layer)))
-              (gimp-selection-layer-alpha pic-layer)
-              (gimp-selection-all image)
-          )
-        )
+    (if (= selection-exists 0)
+        (gimp-image-select-item image CHANNEL-OP-REPLACE pic-layer)
     )
 
     ; Store it for later.
-    (set! select (car (gimp-selection-save image)))
+    (set! selection (car (gimp-selection-save image)))
     ; Try to lose the jaggies
     (gimp-selection-feather image 2)
 
@@ -151,17 +150,17 @@
     ;
     ; Restore things
     ;
-    (if (= bevelling-whole-image TRUE)
+    (if (= selection-exists 0)
         (gimp-selection-none image)        ; No selection to start with
-        (gimp-selection-load select)
+        (gimp-image-select-item image CHANNEL-OP-REPLACE selection)
     )
     ; If they started with a selection, they can Select->Invert then
     ; Edit->Clear for a cutout.
 
     ; clean up
-    (gimp-image-remove-channel image select)
+    (gimp-image-remove-channel image selection)
     (if (= keep-bump-layer TRUE)
-        (gimp-drawable-set-visible bump-layer 0)
+        (gimp-item-set-visible bump-layer 0)
         (gimp-image-remove-layer image bump-layer)
     )
 
diff --git a/scripts/addborder.scm b/scripts/addborder.scm
index df61cf3..4a2b8fe 100644
--- a/scripts/addborder.scm
+++ b/scripts/addborder.scm
@@ -1,9 +1,9 @@
 ; GIMP - The GNU Image Manipulation Program
 ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -12,8 +12,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;
 ; Copyright (C) 1997 Andy Thomas alt picnic demon co uk
 ;
@@ -98,7 +97,7 @@
       n_array)
   )
 
-  (let* ((img (car (gimp-drawable-get-image adraw)))
+  (let* ((img (car (gimp-item-get-image adraw)))
          (owidth (car (gimp-image-width img)))
          (oheight (car (gimp-image-height img)))
          (width (+ owidth (* 2 xsize)))
@@ -106,9 +105,11 @@
          (layer (car (gimp-layer-new img
                                      width height
                                      (car (gimp-drawable-type-with-alpha adraw))
-                                     "Border-Layer" 100 NORMAL-MODE))))
+                                     _"Border Layer" 100 NORMAL-MODE))))
 
     (gimp-context-push)
+    (gimp-context-set-antialias FALSE)
+    (gimp-context-set-feather FALSE)
 
     (gimp-image-undo-group-start img)
 
@@ -118,45 +119,33 @@
                        xsize
                        ysize)
 
-    (gimp-image-add-layer img layer 0)
+    (gimp-image-insert-layer img layer 0 0)
     (gimp-drawable-fill layer TRANSPARENT-FILL)
 
     (gimp-context-set-background (adjcolour colour dvalue))
-    (gimp-free-select img
-                      10
-                      (gen_top_array xsize ysize owidth oheight width height)
-                      CHANNEL-OP-REPLACE
-                      0
-                      0
-                      0.0)
+    (gimp-image-select-polygon img
+                               CHANNEL-OP-REPLACE
+                               10
+                               (gen_top_array xsize ysize owidth oheight width height))
     (gimp-edit-fill layer BACKGROUND-FILL)
     (gimp-context-set-background (adjcolour colour (/ dvalue 2)))
-    (gimp-free-select img
-                      10
-                      (gen_left_array xsize ysize owidth oheight width height)
-                      CHANNEL-OP-REPLACE
-                      0
-                      0
-                      0.0)
+    (gimp-image-select-polygon img
+                               CHANNEL-OP-REPLACE
+                               10
+                               (gen_left_array xsize ysize owidth oheight width height))
     (gimp-edit-fill layer BACKGROUND-FILL)
     (gimp-context-set-background (adjcolour colour (- 0 (/ dvalue 2))))
-    (gimp-free-select img
-                      10
-                      (gen_right_array xsize ysize owidth oheight width height)
-                      CHANNEL-OP-REPLACE
-                      0
-                      0
-                      0.0)
+    (gimp-image-select-polygon img
+                               CHANNEL-OP-REPLACE
+                               10
+                               (gen_right_array xsize ysize owidth oheight width height))
 
     (gimp-edit-fill layer BACKGROUND-FILL)
     (gimp-context-set-background (adjcolour colour (- 0 dvalue)))
-    (gimp-free-select img
-                      10
-                      (gen_bottom_array xsize ysize owidth oheight width height)
-                      CHANNEL-OP-REPLACE
-                      0
-                      0
-                      0.0)
+    (gimp-image-select-polygon img
+                               CHANNEL-OP-REPLACE
+                               10
+                               (gen_bottom_array xsize ysize owidth oheight width height))
 
     (gimp-edit-fill layer BACKGROUND-FILL)
     (gimp-selection-none img)
diff --git a/scripts/alien-glow-arrow.scm b/scripts/alien-glow-arrow.scm
index 31876a0..9eb8a3d 100644
--- a/scripts/alien-glow-arrow.scm
+++ b/scripts/alien-glow-arrow.scm
@@ -10,9 +10,9 @@
 ; Federico Mena Quintero
 ; federico nuclecu unam mx
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -21,8 +21,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 (define (script-fu-alien-glow-right-arrow size
                                           orientation
@@ -116,30 +115,31 @@
         (offset (/ size 6))
         (ruler-layer (car (gimp-layer-new img
                                           size size RGBA-IMAGE
-                                          "Ruler" 100 NORMAL-MODE)))
+                                          _"Arrow" 100 NORMAL-MODE)))
         (glow-layer (car (gimp-layer-new img
                                          size size RGBA-IMAGE
-                                         "Alien Glow" 100 NORMAL-MODE)))
+                                         _"Alien Glow" 100 NORMAL-MODE)))
         (bg-layer (car (gimp-layer-new img
                                        size size RGB-IMAGE
-                                       "Background" 100 NORMAL-MODE)))
+                                       _"Background" 100 NORMAL-MODE)))
         (big-arrow (point-list->double-array
                     (rotate-points (make-arrow size offset)
                                     size orientation)))
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-image-undo-disable img)
     ;(gimp-image-resize img (+ length height) (+ height height) 0 0)
-    (gimp-image-add-layer img bg-layer 1)
-    (gimp-image-add-layer img glow-layer -1)
-    (gimp-image-add-layer img ruler-layer -1)
+    (gimp-image-insert-layer img bg-layer 0 1)
+    (gimp-image-insert-layer img glow-layer 0 -1)
+    (gimp-image-insert-layer img ruler-layer 0 -1)
 
     (gimp-edit-clear glow-layer)
     (gimp-edit-clear ruler-layer)
 
-    (gimp-free-select img 6 big-arrow CHANNEL-OP-REPLACE TRUE FALSE 0)
+    (gimp-image-select-polygon img CHANNEL-OP-REPLACE 6 big-arrow)
 
     (gimp-context-set-foreground '(103 103 103))
     (gimp-context-set-background '(0 0 0))
@@ -186,4 +186,4 @@
 )
 
 (script-fu-menu-register "script-fu-alien-glow-right-arrow"
-                         "<Toolbox>/Xtns/Web Page Themes/Alien Glow")
+                         "<Image>/File/Create/Web Page Themes/Alien Glow")
diff --git a/scripts/alien-glow-bar.scm b/scripts/alien-glow-bar.scm
index 229b688..19339f3 100644
--- a/scripts/alien-glow-bar.scm
+++ b/scripts/alien-glow-bar.scm
@@ -6,9 +6,9 @@
 ; aklikins eos ncsu edu
 ;
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -17,8 +17,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 (define (script-fu-alien-glow-horizontal-ruler length
                                                height
@@ -30,22 +29,23 @@
         (border (/ height 4))
         (ruler-layer (car (gimp-layer-new img
                                           (+ length height) (+ height height)
-                                          RGBA-IMAGE "Ruler" 100 NORMAL-MODE)))
+                                          RGBA-IMAGE _"Bar" 100 NORMAL-MODE)))
         (glow-layer (car (gimp-layer-new img
                                          (+ length height) (+ height height)
-                                         RGBA-IMAGE "Alien Glow" 100 NORMAL-MODE)))
+                                         RGBA-IMAGE _"Alien Glow" 100 NORMAL-MODE)))
         (bg-layer (car (gimp-layer-new img
                                        (+ length height) (+ height height)
-                                       RGB-IMAGE "Background" 100 NORMAL-MODE)))
+                                       RGB-IMAGE _"Background" 100 NORMAL-MODE)))
         )
 
     (gimp-context-push)
+    (gimp-context-set-feather FALSE)
 
     (gimp-image-undo-disable img)
     (gimp-image-resize img (+ length height) (+ height height) 0 0)
-    (gimp-image-add-layer img bg-layer 1)
-    (gimp-image-add-layer img glow-layer -1)
-    (gimp-image-add-layer img ruler-layer -1)
+    (gimp-image-insert-layer img bg-layer 0 1)
+    (gimp-image-insert-layer img glow-layer 0 -1)
+    (gimp-image-insert-layer img ruler-layer 0 -1)
 
    ; (gimp-layer-set-lock-alpha ruler-layer TRUE)
     (gimp-context-set-background bg-color)
@@ -53,9 +53,9 @@
     (gimp-edit-clear glow-layer)
     (gimp-edit-clear ruler-layer)
 
-    (gimp-rect-select img
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE
                       (/ height 2) (/ height 2)
-                      length height CHANNEL-OP-REPLACE FALSE 0)
+                      length height)
     (gimp-context-set-foreground '(79 79 79))
     (gimp-context-set-background '(0 0 0))
 
@@ -97,4 +97,4 @@
 )
 
 (script-fu-menu-register "script-fu-alien-glow-horizontal-ruler"
-                         "<Toolbox>/Xtns/Web Page Themes/Alien Glow")
+                         "<Image>/File/Create/Web Page Themes/Alien Glow")
diff --git a/scripts/alien-glow-bullet.scm b/scripts/alien-glow-bullet.scm
index 160c65d..e430c37 100644
--- a/scripts/alien-glow-bullet.scm
+++ b/scripts/alien-glow-bullet.scm
@@ -5,9 +5,9 @@
 ; Copyright (c) 1997 Adrian Likins
 ; aklikins eos ncsu edu
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -16,8 +16,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 (define (script-fu-alien-glow-bullet radius
                                      glow-color
@@ -25,8 +24,12 @@
                                      flatten)
 
   (define (center-ellipse img cx cy rx ry op aa feather frad)
-    (gimp-ellipse-select img (- cx rx) (- cy ry) (+ rx rx) (+ ry ry)
-                         op aa feather frad)
+    (gimp-context-push)
+    (gimp-context-set-antialias aa)
+    (gimp-context-set-feather feather)
+    (gimp-context-set-feather-radius frad frad)
+    (gimp-image-select-ellipse img op (- cx rx) (- cy ry) (+ rx rx) (+ ry ry))
+    (gimp-context-pop)
   )
 
 
@@ -38,20 +41,20 @@
         (blend-start (+ half-radius (/ half-radius 2)))
         (bullet-layer (car (gimp-layer-new img
                                            diameter diameter RGBA-IMAGE
-                                           "Ruler" 100 NORMAL-MODE)))
+                                           _"Bullet" 100 NORMAL-MODE)))
         (glow-layer (car (gimp-layer-new img diameter diameter RGBA-IMAGE
-                                         "ALien Glow" 100 NORMAL-MODE)))
+                                         _"Alien Glow" 100 NORMAL-MODE)))
         (bg-layer (car (gimp-layer-new img diameter diameter RGB-IMAGE
-                                       "Background" 100 NORMAL-MODE)))
+                                       _"Background" 100 NORMAL-MODE)))
         )
 
     (gimp-context-push)
 
     (gimp-image-undo-disable img)
     (gimp-image-resize img diameter diameter 0 0)
-    (gimp-image-add-layer img bg-layer 1)
-    (gimp-image-add-layer img glow-layer -1)
-    (gimp-image-add-layer img bullet-layer -1)
+    (gimp-image-insert-layer img bg-layer 0 1)
+    (gimp-image-insert-layer img glow-layer 0 -1)
+    (gimp-image-insert-layer img bullet-layer 0 -1)
 
     ; (gimp-layer-set-lock-alpha ruler-layer TRUE)
     (gimp-context-set-background bg-color)
@@ -106,4 +109,4 @@
 )
 
 (script-fu-menu-register "script-fu-alien-glow-bullet"
-                         "<Toolbox>/Xtns/Web Page Themes/Alien Glow")
+                         "<Image>/File/Create/Web Page Themes/Alien Glow")
diff --git a/scripts/alien-glow-button.scm b/scripts/alien-glow-button.scm
index 7c2236a..1787181 100644
--- a/scripts/alien-glow-button.scm
+++ b/scripts/alien-glow-button.scm
@@ -8,9 +8,9 @@
 ; based on code from Frederico Mena Quintero (Quartic)
 ; federico nuclecu unam mx
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -19,8 +19,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 (define (script-fu-alien-glow-button text
@@ -76,33 +75,34 @@
         (img (car (gimp-image-new img-width img-height RGB)))
         (bg-layer (car (gimp-layer-new img
                                        img-width img-height RGBA-IMAGE
-                                       "Background" 100 NORMAL-MODE)))
+                                       _"Background" 100 NORMAL-MODE)))
         (glow-layer (car (gimp-layer-new img
                                          img-width img-height RGBA-IMAGE
-                                         "Glow" 100 NORMAL-MODE)))
+                                         _"Glow" 100 NORMAL-MODE)))
         (button-layer (car (gimp-layer-new img
                                            layer-width layer-height RGBA-IMAGE
-                                           "Button" 100 NORMAL-MODE)))
+                                           _"Button" 100 NORMAL-MODE)))
         )
 
     (gimp-context-push)
+    (gimp-context-set-feather FALSE)
 
     (gimp-image-undo-disable img)
 
     ; Create bumpmap layer
 
-    (gimp-image-add-layer img bg-layer -1)
+    (gimp-image-insert-layer img bg-layer 0 -1)
     (gimp-context-set-foreground '(0 0 0))
     (gimp-context-set-background bg-color)
     (gimp-edit-fill bg-layer BACKGROUND-FILL)
-    (gimp-image-add-layer img glow-layer -1)
+    (gimp-image-insert-layer img glow-layer 0 -1)
 
     ; Create text layer
 
-    (gimp-image-add-layer img button-layer -1)
+    (gimp-image-insert-layer img button-layer 0 -1)
     (gimp-layer-set-offsets button-layer (/ glow-radius 2) (/ glow-radius 2))
     (gimp-selection-none img)
-    (gimp-rect-select img 0 0 img-width img-height CHANNEL-OP-REPLACE FALSE 0)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 0 img-width img-height)
     (gimp-context-set-foreground '(100 100 100))
     (gimp-context-set-background '(0 0 0))
 
@@ -113,12 +113,12 @@
 
     (gimp-edit-clear glow-layer)
 
-    (gimp-rect-select img
+    (gimp-image-select-rectangle img
+                      CHANNEL-OP-REPLACE
                       (/ glow-radius 4)
                       (/ glow-radius 4)
                       (- img-width (/ glow-radius 2))
-                      (- img-height (/ glow-radius 2))
-                      CHANNEL-OP-REPLACE FALSE 0 )
+                      (- img-height (/ glow-radius 2)))
 
     (gimp-context-set-foreground glow-color)
     (gimp-edit-fill glow-layer FOREGROUND-FILL)
@@ -165,4 +165,4 @@
 )
 
 (script-fu-menu-register "script-fu-alien-glow-button"
-                         "<Toolbox>/Xtns/Web Page Themes/Alien Glow")
+                         "<Image>/File/Create/Web Page Themes/Alien Glow")
diff --git a/scripts/alien-glow-logo.scm b/scripts/alien-glow-logo.scm
index 8c5e06a..0430768 100644
--- a/scripts/alien-glow-logo.scm
+++ b/scripts/alien-glow-logo.scm
@@ -20,16 +20,16 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-selection-none img)
     (script-fu-util-image-resize-from-layer img logo-layer)
-    (gimp-image-add-layer img bg-layer 1)
-    (gimp-image-add-layer img glow-layer 1)
+    (script-fu-util-image-add-layers img glow-layer bg-layer)
     (gimp-layer-set-lock-alpha logo-layer TRUE)
     (gimp-context-set-background '(0 0 0))
     (gimp-edit-fill bg-layer BACKGROUND-FILL)
     (gimp-edit-clear glow-layer)
-    (gimp-selection-layer-alpha logo-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
     (gimp-selection-grow img grow)
     (gimp-selection-feather img feather)
     (gimp-context-set-foreground glow-color)
@@ -115,4 +115,4 @@
 )
 
 (script-fu-menu-register "script-fu-alien-glow-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/alien-neon-logo.scm b/scripts/alien-neon-logo.scm
index cd4328c..b27f961 100644
--- a/scripts/alien-neon-logo.scm
+++ b/scripts/alien-neon-logo.scm
@@ -4,9 +4,9 @@
 ; alien-neon-logo.scm - creates multiple outlines around the letters
 ; Copyright (C) 1999-2000 Raphael Quinet <quinet gamers org>
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -15,8 +15,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;
 ; 1999-12-01 First version.
 ; 2000-02-19 Do not discard the layer mask so that it can still be edited.
@@ -46,17 +45,17 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (script-fu-util-image-resize-from-layer img logo-layer)
-    (gimp-image-add-layer img bg-layer 1)
-    (gimp-image-add-layer img bands-layer 1)
+    (script-fu-util-image-add-layers img bands-layer bg-layer)
     (gimp-selection-none img)
     (gimp-context-set-background bg-color)
     (gimp-edit-fill bg-layer BACKGROUND-FILL)
     (gimp-context-set-background '(0 0 0))
     (gimp-edit-fill bands-layer BACKGROUND-FILL)
     ; The text layer is never shown: it is only used to create a selection
-    (gimp-selection-layer-alpha logo-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
     (gimp-context-set-foreground '(255 255 255))
     (gimp-edit-fill bands-layer FOREGROUND-FILL)
 
@@ -76,7 +75,7 @@
         (let ((bands-layer-mask (car (gimp-layer-create-mask bands-layer
                                                              ADD-BLACK-MASK))))
           (gimp-layer-add-mask bands-layer bands-layer-mask)
-          (gimp-selection-layer-alpha logo-layer)
+          (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
           (gimp-selection-border img fade-size)
           (gimp-edit-fill bands-layer-mask FOREGROUND-FILL)
           (gimp-layer-remove-mask bands-layer MASK-APPLY)))
@@ -97,7 +96,7 @@
     ;; (gimp-layer-remove-mask bands-layer MASK-APPLY)
 
     ; Clean up and exit.
-    (gimp-drawable-set-visible logo-layer 0)
+    (gimp-item-set-visible logo-layer 0)
     (gimp-image-set-active-layer img bands-layer)
     (gimp-displays-flush)
 
@@ -185,4 +184,4 @@
 )
 
 (script-fu-menu-register "script-fu-alien-neon-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/basic1-logo.scm b/scripts/basic1-logo.scm
index e50cd35..07f63b2 100644
--- a/scripts/basic1-logo.scm
+++ b/scripts/basic1-logo.scm
@@ -13,18 +13,18 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-selection-none img)
     (script-fu-util-image-resize-from-layer img logo-layer)
-    (gimp-image-add-layer img shadow-layer 1)
-    (gimp-image-add-layer img bg-layer 2)
+    (script-fu-util-image-add-layers img shadow-layer bg-layer)
     (gimp-context-set-foreground text-color)
     (gimp-layer-set-lock-alpha logo-layer TRUE)
     (gimp-edit-fill logo-layer FOREGROUND-FILL)
     (gimp-context-set-background bg-color)
     (gimp-edit-fill bg-layer BACKGROUND-FILL)
     (gimp-edit-clear shadow-layer)
-    (gimp-selection-layer-alpha logo-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
     (gimp-context-set-background '(0 0 0))
     (gimp-selection-feather img 7.5)
     (gimp-edit-fill shadow-layer BACKGROUND-FILL)
@@ -103,4 +103,4 @@
 )
 
 (script-fu-menu-register "script-fu-basic1-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/basic2-logo.scm b/scripts/basic2-logo.scm
index 06f240f..1cab076 100644
--- a/scripts/basic2-logo.scm
+++ b/scripts/basic2-logo.scm
@@ -31,12 +31,11 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-selection-none img)
     (script-fu-util-image-resize-from-layer img logo-layer)
-    (gimp-image-add-layer img bg-layer 1)
-    (gimp-image-add-layer img shadow-layer 1)
-    (gimp-image-add-layer img highlight-layer 1)
+    (script-fu-util-image-add-layers img highlight-layer shadow-layer bg-layer)
     (gimp-context-set-foreground text-color)
     (gimp-layer-set-lock-alpha logo-layer TRUE)
     (gimp-edit-fill logo-layer FOREGROUND-FILL)
@@ -46,7 +45,7 @@
     (gimp-edit-fill highlight-layer FOREGROUND-FILL)
     (gimp-context-set-background bg-color)
     (gimp-drawable-fill bg-layer BACKGROUND-FILL)
-    (gimp-selection-layer-alpha logo-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
     (gimp-context-set-background '(0 0 0))
     (gimp-selection-feather img 7.5)
     (gimp-edit-fill shadow-layer BACKGROUND-FILL)
@@ -60,7 +59,7 @@
 
     (gimp-layer-translate shadow-layer 3 3)
     (gimp-layer-translate highlight-layer (- posx 2) (- posy 2))
-    (gimp-drawable-set-name highlight-layer "Highlight")
+    (gimp-item-set-name highlight-layer "Highlight")
 
     (gimp-context-pop)
   )
@@ -126,4 +125,4 @@
 )
 
 (script-fu-menu-register "script-fu-basic2-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/beveled-button.scm b/scripts/beveled-button.scm
index c297894..e1ddbdd 100644
--- a/scripts/beveled-button.scm
+++ b/scripts/beveled-button.scm
@@ -5,9 +5,9 @@
 ; Copyright (C) 1997 Federico Mena Quintero
 ; federico nuclecu unam mx
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -16,8 +16,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ; ************************************************************************
 ; Changed on Feb 4, 1999 by Piet van Oostrum <piet cs uu nl>
 ; For use with GIMP 1.1.
@@ -75,40 +74,40 @@
 
         (bumpmap (car (gimp-layer-new img
                                       img-width img-height RGBA-IMAGE
-                                      "Bumpmap" 100 NORMAL-MODE)))
+                                      _"Bumpmap" 100 NORMAL-MODE)))
         (gradient (car (gimp-layer-new img
                                        img-width img-height RGBA-IMAGE
-                                       "Gradient" 100 NORMAL-MODE)))
+                                       _"Gradient" 100 NORMAL-MODE)))
         )
 
     (gimp-context-push)
-
+    (gimp-context-set-feather FALSE)
     (gimp-image-undo-disable img)
 
     ; Create bumpmap layer
 
-    (gimp-image-add-layer img bumpmap -1)
+    (gimp-image-insert-layer img bumpmap 0 -1)
     (gimp-context-set-foreground '(0 0 0))
     (gimp-context-set-background '(255 255 255))
     (gimp-edit-fill bumpmap BACKGROUND-FILL)
 
-    (gimp-rect-select img 0 0 bevel-width img-height CHANNEL-OP-REPLACE FALSE 0)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 0 bevel-width img-height)
     (blend-bumpmap img bumpmap 0 0 (- bevel-width 1) 0)
 
-    (gimp-rect-select img 0 0 img-width bevel-width CHANNEL-OP-REPLACE FALSE 0)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 0 img-width bevel-width)
     (blend-bumpmap img bumpmap 0 0 0 (- bevel-width 1))
 
-    (gimp-rect-select img (- img-width bevel-width) 0 bevel-width img-height CHANNEL-OP-REPLACE FALSE 0)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE (- img-width bevel-width) 0 bevel-width img-height)
     (blend-bumpmap img bumpmap (- img-width 1) 0 (- img-width bevel-width) 0)
 
-    (gimp-rect-select img 0 (- img-height bevel-width) img-width bevel-width CHANNEL-OP-REPLACE FALSE 0)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 (- img-height bevel-width) img-width bevel-width)
     (blend-bumpmap img bumpmap 0 (- img-height 1) 0 (- img-height bevel-width))
 
     (gimp-selection-none img)
 
     ; Create gradient layer
 
-    (gimp-image-add-layer img gradient -1)
+    (gimp-image-insert-layer img gradient 0 -1)
     (gimp-context-set-foreground ul-color)
     (gimp-context-set-background lr-color)
 
@@ -158,4 +157,4 @@
 )
 
 (script-fu-menu-register "script-fu-button00"
-                         "<Toolbox>/Xtns/Buttons")
+                         "<Image>/File/Create/Buttons")
diff --git a/scripts/beveled-pattern-arrow.scm b/scripts/beveled-pattern-arrow.scm
index 5052922..02ea5c3 100644
--- a/scripts/beveled-pattern-arrow.scm
+++ b/scripts/beveled-pattern-arrow.scm
@@ -5,9 +5,9 @@
 ; Copyright (C) 1997 Federico Mena Quintero
 ; federico nuclecu unam mx
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -16,8 +16,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 (define (script-fu-beveled-pattern-arrow size orientation pattern)
@@ -76,18 +75,19 @@
 
   (let* (
         (img (car (gimp-image-new size size RGB)))
-        (background (car (gimp-layer-new img size size RGB-IMAGE "Arrow" 100 NORMAL-MODE)))
-        (bumpmap (car (gimp-layer-new img size size RGB-IMAGE "Bumpmap" 100 NORMAL-MODE)))
+        (background (car (gimp-layer-new img size size RGB-IMAGE _"Arrow" 100 NORMAL-MODE)))
+        (bumpmap (car (gimp-layer-new img size size RGB-IMAGE _"Bumpmap" 100 NORMAL-MODE)))
         (big-arrow (point-list->double-array (rotate-points (make-arrow size 6) size orientation)))
         (med-arrow (point-list->double-array (rotate-points (make-arrow size 7) size orientation)))
         (small-arrow (point-list->double-array (rotate-points (make-arrow size 8) size orientation)))
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-image-undo-disable img)
-    (gimp-image-add-layer img background -1)
-    (gimp-image-add-layer img bumpmap -1)
+    (gimp-image-insert-layer img background 0 -1)
+    (gimp-image-insert-layer img bumpmap 0 -1)
 
     ; Create pattern layer
 
@@ -101,19 +101,19 @@
     (gimp-edit-fill bumpmap BACKGROUND-FILL)
 
     (gimp-context-set-background '(127 127 127))
-    (gimp-rect-select img 1 1 (- size 2) (- size 2) CHANNEL-OP-REPLACE FALSE 0)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE 1 1 (- size 2) (- size 2))
     (gimp-edit-fill bumpmap BACKGROUND-FILL)
 
     (gimp-context-set-background '(255 255 255))
-    (gimp-rect-select img 2 2 (- size 4) (- size 4) CHANNEL-OP-REPLACE FALSE 0)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE 2 2 (- size 4) (- size 4))
     (gimp-edit-fill bumpmap BACKGROUND-FILL)
 
     (gimp-context-set-background '(127 127 127))
-    (gimp-free-select img 6 big-arrow CHANNEL-OP-REPLACE TRUE FALSE 0)
+    (gimp-image-select-polygon img CHANNEL-OP-REPLACE 6 big-arrow)
     (gimp-edit-fill bumpmap BACKGROUND-FILL)
 
     (gimp-context-set-background '(0 0 0))
-    (gimp-free-select img 6 med-arrow CHANNEL-OP-REPLACE TRUE FALSE 0)
+    (gimp-image-select-polygon img CHANNEL-OP-REPLACE 6 med-arrow)
     (gimp-edit-fill bumpmap BACKGROUND-FILL)
 
     (gimp-selection-none img)
@@ -128,7 +128,7 @@
     (gimp-edit-fill bumpmap BACKGROUND-FILL)
 
     (gimp-context-set-background '(192 192 192))
-    (gimp-free-select img 6 small-arrow CHANNEL-OP-REPLACE TRUE FALSE 0)
+    (gimp-image-select-polygon img CHANNEL-OP-REPLACE 6 small-arrow)
     (gimp-edit-fill bumpmap BACKGROUND-FILL)
 
     (gimp-selection-none img)
@@ -158,4 +158,4 @@
 )
 
 (script-fu-menu-register "script-fu-beveled-pattern-arrow"
-                         "<Toolbox>/Xtns/Web Page Themes/Beveled Pattern")
+                         "<Image>/File/Create/Web Page Themes/Beveled Pattern")
diff --git a/scripts/beveled-pattern-bullet.scm b/scripts/beveled-pattern-bullet.scm
index 52c6048..c76405a 100644
--- a/scripts/beveled-pattern-bullet.scm
+++ b/scripts/beveled-pattern-bullet.scm
@@ -5,9 +5,9 @@
 ; Copyright (C) 1997 Federico Mena Quintero
 ; federico nuclecu unam mx
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -16,22 +16,22 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 (define (script-fu-beveled-pattern-bullet diameter pattern transparent)
   (let* (
         (img (car (gimp-image-new diameter diameter RGB)))
-        (background (car (gimp-layer-new img diameter diameter RGBA-IMAGE "Bullet" 100 NORMAL-MODE)))
-        (bumpmap (car (gimp-layer-new img diameter diameter RGBA-IMAGE "Bumpmap" 100 NORMAL-MODE)))
+        (background (car (gimp-layer-new img diameter diameter RGBA-IMAGE _"Bullet" 100 NORMAL-MODE)))
+        (bumpmap (car (gimp-layer-new img diameter diameter RGBA-IMAGE _"Bumpmap" 100 NORMAL-MODE)))
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-image-undo-disable img)
-    (gimp-image-add-layer img background -1)
-    (gimp-image-add-layer img bumpmap -1)
+    (gimp-image-insert-layer img background 0 -1)
+    (gimp-image-insert-layer img bumpmap 0 -1)
 
     ; Create pattern layer
 
@@ -45,11 +45,11 @@
     (gimp-edit-fill bumpmap BACKGROUND-FILL)
 
     (gimp-context-set-background '(127 127 127))
-    (gimp-ellipse-select img 1 1 (- diameter 2) (- diameter 2) CHANNEL-OP-REPLACE TRUE FALSE 0)
+    (gimp-image-select-ellipse img CHANNEL-OP-REPLACE 1 1 (- diameter 2) (- diameter 2))
     (gimp-edit-fill bumpmap BACKGROUND-FILL)
 
     (gimp-context-set-background '(255 255 255))
-    (gimp-ellipse-select img 2 2 (- diameter 4) (- diameter 4) CHANNEL-OP-REPLACE TRUE FALSE 0)
+    (gimp-image-select-ellipse img CHANNEL-OP-REPLACE 2 2 (- diameter 4) (- diameter 4))
     (gimp-edit-fill bumpmap BACKGROUND-FILL)
 
     (gimp-selection-none img)
@@ -61,7 +61,7 @@
     ; Background
 
     (gimp-context-set-background '(0 0 0))
-    (gimp-ellipse-select img 0 0 diameter diameter CHANNEL-OP-REPLACE TRUE FALSE 0)
+    (gimp-image-select-ellipse img CHANNEL-OP-REPLACE 0 0 diameter diameter)
     (gimp-selection-invert img)
     (gimp-edit-clear background)
     (gimp-selection-none img)
@@ -93,4 +93,4 @@
 )
 
 (script-fu-menu-register "script-fu-beveled-pattern-bullet"
-                         "<Toolbox>/Xtns/Web Page Themes/Beveled Pattern")
+                         "<Image>/File/Create/Web Page Themes/Beveled Pattern")
diff --git a/scripts/beveled-pattern-button.scm b/scripts/beveled-pattern-button.scm
index 61e74fd..aba9648 100644
--- a/scripts/beveled-pattern-button.scm
+++ b/scripts/beveled-pattern-button.scm
@@ -5,9 +5,9 @@
 ; Copyright (C) 1997 Federico Mena Quintero
 ; federico nuclecu unam mx
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -16,8 +16,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ; ************************************************************************
 ; Changed on Feb 4, 1999 by Piet van Oostrum <piet cs uu nl>
 ; For use with GIMP 1.1.
@@ -54,18 +53,19 @@
                    (+ ascent descent)))
 
         (img (car (gimp-image-new width height RGB)))
-        (background (car (gimp-layer-new img width height RGBA-IMAGE "Background" 100 NORMAL-MODE)))
-        (bumpmap (car (gimp-layer-new img width height RGBA-IMAGE "Bumpmap" 100 NORMAL-MODE)))
+        (background (car (gimp-layer-new img width height RGBA-IMAGE _"Background" 100 NORMAL-MODE)))
+        (bumpmap (car (gimp-layer-new img width height RGBA-IMAGE _"Bumpmap" 100 NORMAL-MODE)))
         (textl (car
                 (gimp-text-fontname
                  img -1 0 0 text 0 TRUE text-size PIXELS font)))
         )
 
     (gimp-context-push)
+    (gimp-context-set-feather FALSE)
 
     (gimp-image-undo-disable img)
-    (gimp-image-add-layer img background 1)
-    (gimp-image-add-layer img bumpmap 1)
+    (gimp-image-insert-layer img background 0 1)
+    (gimp-image-insert-layer img bumpmap 0 1)
 
     ; Create pattern layer
 
@@ -79,11 +79,11 @@
     (gimp-edit-fill bumpmap BACKGROUND-FILL)
 
     (gimp-context-set-background '(127 127 127))
-    (gimp-rect-select img 1 1 (- width 2) (- height 2) CHANNEL-OP-REPLACE FALSE 0)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE 1 1 (- width 2) (- height 2))
     (gimp-edit-fill bumpmap BACKGROUND-FILL)
 
     (gimp-context-set-background '(255 255 255))
-    (gimp-rect-select img 2 2 (- width 4) (- height 4) CHANNEL-OP-REPLACE FALSE 0)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE 2 2 (- width 4) (- height 4))
     (gimp-edit-fill bumpmap BACKGROUND-FILL)
 
     (gimp-selection-none img)
@@ -132,4 +132,4 @@
 )
 
 (script-fu-menu-register "script-fu-beveled-pattern-button"
-                         "<Toolbox>/Xtns/Web Page Themes/Beveled Pattern")
+                         "<Image>/File/Create/Web Page Themes/Beveled Pattern")
diff --git a/scripts/beveled-pattern-heading.scm b/scripts/beveled-pattern-heading.scm
index a1cd3d7..83ee2cd 100644
--- a/scripts/beveled-pattern-heading.scm
+++ b/scripts/beveled-pattern-heading.scm
@@ -5,9 +5,9 @@
 ; Copyright (C) 1997 Federico Mena Quintero
 ; federico nuclecu unam mx
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -16,8 +16,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ; ************************************************************************
 ; Changed on Feb 4, 1999 by Piet van Oostrum <piet cs uu nl>
 ; For use with GIMP 1.1.
@@ -39,18 +38,19 @@
 
         (background (car (gimp-layer-new img
                                          width height RGBA-IMAGE
-                                         "Background" 100 NORMAL-MODE)))
+                                         _"Background" 100 NORMAL-MODE)))
         (bumpmap (car (gimp-layer-new img
                                       width height RGBA-IMAGE
-                                      "Bumpmap" 100 NORMAL-MODE)))
+                                      _"Bumpmap" 100 NORMAL-MODE)))
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-image-undo-disable img)
     (gimp-image-resize img width height 0 0)
-    (gimp-image-add-layer img background 1)
-    (gimp-image-add-layer img bumpmap 1)
+    (gimp-image-insert-layer img background 0 1)
+    (gimp-image-insert-layer img bumpmap 0 1)
 
     ; Create pattern layer
 
@@ -65,12 +65,12 @@
     (gimp-edit-fill bumpmap BACKGROUND-FILL)
 
     (gimp-context-set-background '(127 127 127))
-    (gimp-selection-layer-alpha textl)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE textl)
     (gimp-selection-shrink img 1)
     (gimp-edit-fill bumpmap BACKGROUND-FILL)
 
     (gimp-context-set-background '(255 255 255))
-    (gimp-selection-layer-alpha textl)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE textl)
     (gimp-selection-shrink img 2)
     (gimp-edit-fill bumpmap BACKGROUND-FILL)
 
@@ -83,7 +83,7 @@
     ; Clean up
 
     (gimp-context-set-background '(0 0 0))
-    (gimp-selection-layer-alpha textl)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE textl)
     (gimp-selection-invert img)
     (gimp-edit-clear background)
     (gimp-selection-none img)
@@ -118,4 +118,4 @@
 )
 
 (script-fu-menu-register "script-fu-beveled-pattern-heading"
-                         "<Toolbox>/Xtns/Web Page Themes/Beveled Pattern")
+                         "<Image>/File/Create/Web Page Themes/Beveled Pattern")
diff --git a/scripts/beveled-pattern-hrule.scm b/scripts/beveled-pattern-hrule.scm
index 0770bfa..0ec7f5c 100644
--- a/scripts/beveled-pattern-hrule.scm
+++ b/scripts/beveled-pattern-hrule.scm
@@ -5,9 +5,9 @@
 ; Copyright (C) 1997 Federico Mena Quintero
 ; federico nuclecu unam mx
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -16,8 +16,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 (define (script-fu-beveled-pattern-hrule width height pattern)
@@ -25,17 +24,18 @@
         (img (car (gimp-image-new width height RGB)))
         (background (car (gimp-layer-new img
                                          width height RGB-IMAGE
-                                         "Hrule" 100 NORMAL-MODE)))
+                                         _"Rule" 100 NORMAL-MODE)))
         (bumpmap (car (gimp-layer-new img
                                       width height RGBA-IMAGE
-                                      "Bumpmap" 100 NORMAL-MODE)))
+                                      _"Bumpmap" 100 NORMAL-MODE)))
         )
 
     (gimp-context-push)
+    (gimp-context-set-feather FALSE)
 
     (gimp-image-undo-disable img)
-    (gimp-image-add-layer img background -1)
-    (gimp-image-add-layer img bumpmap -1)
+    (gimp-image-insert-layer img background 0 -1)
+    (gimp-image-insert-layer img bumpmap 0 -1)
 
     ; Create pattern layer
 
@@ -49,11 +49,11 @@
     (gimp-edit-fill bumpmap BACKGROUND-FILL)
 
     (gimp-context-set-background '(127 127 127))
-    (gimp-rect-select img 1 1 (- width 2) (- height 2) CHANNEL-OP-REPLACE FALSE 0)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE 1 1 (- width 2) (- height 2))
     (gimp-edit-fill bumpmap BACKGROUND-FILL)
 
     (gimp-context-set-background '(255 255 255))
-    (gimp-rect-select img 2 2 (- width 4) (- height 4) CHANNEL-OP-REPLACE FALSE 0)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE 2 2 (- width 4) (- height 4))
     (gimp-edit-fill bumpmap BACKGROUND-FILL)
 
     (gimp-selection-none img)
@@ -86,4 +86,4 @@
 )
 
 (script-fu-menu-register "script-fu-beveled-pattern-hrule"
-                         "<Toolbox>/Xtns/Web Page Themes/Beveled Pattern")
+                         "<Image>/File/Create/Web Page Themes/Beveled Pattern")
diff --git a/scripts/blend-anim.scm b/scripts/blend-anim.scm
index a8ec632..a0db22d 100644
--- a/scripts/blend-anim.scm
+++ b/scripts/blend-anim.scm
@@ -1,9 +1,9 @@
 ; GIMP - The GNU Image Manipulation Program
 ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -12,8 +12,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;
 ;
 ; blend-anim.scm   version 1.03   1999/12/21
@@ -39,7 +38,7 @@
 
   (define (multi-raise-layer image layer times)
     (while (> times 0)
-       (gimp-image-raise-layer image layer)
+       (gimp-image-raise-item image layer)
        (set! times (- times 1))
     )
   )
@@ -69,7 +68,7 @@
                          ; add a copy of the lowest blend layer on top
                          (let* ((copy (car (gimp-layer-copy
                                                 (aref layer-array (- num-layers 2)) TRUE))))
-                               (gimp-image-add-layer image copy 0)
+                               (gimp-image-insert-layer image copy 0 0)
                                (set! layers (gimp-image-get-layers image))
                                (set! num-layers (car layers))
                                (set! layer-array (cadr layers))
@@ -80,7 +79,7 @@
                  (let* ((min-offset-x width)
                                 (min-offset-y height)
                                 (layer-count slots))
-                       (gimp-drawable-set-visible bg-layer FALSE)
+                       (gimp-item-set-visible bg-layer FALSE)
                        (while (> layer-count -1)
                                   (let* ((layer (aref layer-array layer-count))
                                  (layer-width (+ (car (gimp-drawable-width layer))
@@ -90,7 +89,7 @@
                                  (layer-offsets (gimp-drawable-offsets layer))
                                  (layer-offset-x (- (car layer-offsets) max-blur))
                                  (layer-offset-y (- (cadr layer-offsets) max-blur)))
-                                (gimp-drawable-set-visible layer FALSE)
+                                (gimp-item-set-visible layer FALSE)
                                 (set! max-width (max max-width layer-width))
                                 (set! max-height (max max-height layer-height))
                                 (set! min-offset-x (min min-offset-x layer-offset-x))
@@ -114,12 +113,12 @@
                                   (upper-copy (car (gimp-layer-copy upper-layer TRUE)))
                                   (lower-copy (car (gimp-layer-copy lower-layer TRUE)))
                                   (bg-copy (car (gimp-layer-copy bg-layer TRUE))))
-                                 (gimp-image-add-layer image bg-copy 0)
-                                 (gimp-image-add-layer image lower-copy 0)
-                                 (gimp-image-add-layer image upper-copy 0)
-                                 (gimp-drawable-set-visible upper-copy TRUE)
-                                 (gimp-drawable-set-visible lower-copy TRUE)
-                                 (gimp-drawable-set-visible bg-copy TRUE)
+                                 (gimp-image-insert-layer image bg-copy 0 0)
+                                 (gimp-image-insert-layer image lower-copy 0 0)
+                                 (gimp-image-insert-layer image upper-copy 0 0)
+                                 (gimp-item-set-visible upper-copy TRUE)
+                                 (gimp-item-set-visible lower-copy TRUE)
+                                 (gimp-item-set-visible bg-copy TRUE)
                                  (gimp-layer-set-opacity upper-copy (- 100 opacity))
                                  (gimp-layer-set-opacity lower-copy opacity)
                                  (gimp-layer-set-opacity bg-copy 100)
@@ -162,7 +161,7 @@
                                                         offset-y)
                                  (let* ((merged-layer (car (gimp-image-merge-visible-layers
                                                           image CLIP-TO-IMAGE))))
-                                       (gimp-drawable-set-visible merged-layer FALSE))
+                                       (gimp-item-set-visible merged-layer FALSE))
                                  (set! frame-count (- frame-count 1))))
                                 (set! layer-count (- layer-count 1)))))
 
@@ -172,14 +171,15 @@
                        (while (< layer-count slots)
                                   (let* ((orig-layer (aref layer-array layer-count))
                                  (bg-copy (car (gimp-layer-copy bg-layer TRUE))))
-                                (gimp-image-add-layer image
+                                (gimp-image-insert-layer image
                                                   bg-copy
+                                                  -1
                                                   (* layer-count (+ frames 1)))
                                 (multi-raise-layer image
                                                orig-layer
                                                (+ (* (- slots layer-count) frames) 1))
-                                (gimp-drawable-set-visible orig-layer TRUE)
-                                (gimp-drawable-set-visible bg-copy TRUE)
+                                (gimp-item-set-visible orig-layer TRUE)
+                                (gimp-item-set-visible bg-copy TRUE)
                                 (gimp-layer-resize bg-copy
                                                max-width
                                                max-height
@@ -187,13 +187,13 @@
                                                offset-y)
                                 (let* ((merged-layer (car (gimp-image-merge-visible-layers
                                                  image CLIP-TO-IMAGE))))
-                          (gimp-drawable-set-visible merged-layer FALSE))
+                          (gimp-item-set-visible merged-layer FALSE))
                           (set! layer-count (+ layer-count 1)))))
 
                  ; merge the lowest blend layer with the background layer
                  (let* ((orig-layer (aref layer-array (- num-layers 2))))
-                       (gimp-drawable-set-visible bg-layer TRUE)
-                       (gimp-drawable-set-visible orig-layer TRUE)
+                       (gimp-item-set-visible bg-layer TRUE)
+                       (gimp-item-set-visible orig-layer TRUE)
                        (gimp-image-merge-visible-layers image CLIP-TO-IMAGE))
 
                  ; make all layers visible again
@@ -203,11 +203,11 @@
                                 (layer-count (- num-result-layers 1)))
                        (while (> layer-count -1)
                           (let* ((layer (aref result-layer-array layer-count))
-                                 (name (string-append "Frame "
-                                                  (number->string
+                                 (name (string-append _"Frame" " "
+                                                      (number->string
                                                        (- num-result-layers layer-count) 10))))
-                                (gimp-drawable-set-visible layer TRUE)
-                                (gimp-drawable-set-name layer name)
+                                (gimp-item-set-visible layer TRUE)
+                                (gimp-item-set-name layer name)
                                 (set! layer-count (- layer-count 1))))
 
                        (if (= looped TRUE)
diff --git a/scripts/blended-logo.scm b/scripts/blended-logo.scm
index 7812a94..bcd4a35 100644
--- a/scripts/blended-logo.scm
+++ b/scripts/blended-logo.scm
@@ -44,20 +44,21 @@
         )
 
     (script-fu-util-image-resize-from-layer img logo-layer)
-    (gimp-image-add-layer img shadow-layer 1)
-    (gimp-image-add-layer img blend-layer 1)
-    (gimp-image-add-layer img drop-shadow-layer 1)
-    (gimp-image-add-layer img text-shadow-layer 0)
+    (script-fu-util-image-add-layers img text-shadow-layer drop-shadow-layer blend-layer shadow-layer)
+    (gimp-image-raise-item img text-shadow-layer)
     (gimp-selection-none img)
     (gimp-edit-clear text-shadow-layer)
     (gimp-edit-clear drop-shadow-layer)
     (gimp-edit-clear blend-layer)
     (gimp-context-set-background bg-color)
     (gimp-drawable-fill shadow-layer BACKGROUND-FILL)
-    (gimp-rect-select img b-size-2 b-size-2 (- width b-size) (- height b-size) CHANNEL-OP-REPLACE TRUE 
b-size-2)
+    (gimp-context-set-feather TRUE)
+    (gimp-context-set-feather-radius b-size-2 b-size-2)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE b-size-2 b-size-2 (- width b-size) (- height b-size))
+    (gimp-context-set-feather FALSE)
     (gimp-context-set-background '(0 0 0))
     (gimp-edit-fill shadow-layer BACKGROUND-FILL)
-    (gimp-selection-layer-alpha logo-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
     (gimp-layer-add-mask text-shadow-layer tsl-layer-mask)
     (gimp-context-set-background '(255 255 255))
     (gimp-edit-fill tsl-layer-mask BACKGROUND-FILL)
@@ -87,7 +88,7 @@
     (gimp-layer-translate blend-layer (- b-size) (- b-size))
     (gimp-layer-translate text-shadow-layer (- ts-size) (- ts-size))
     (gimp-layer-translate drop-shadow-layer ds-size ds-size)
-    (gimp-selection-layer-alpha blend-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE blend-layer)
     (gimp-layer-add-mask drop-shadow-layer dsl-layer-mask)
     (gimp-context-set-background '(255 255 255))
     (gimp-edit-fill dsl-layer-mask BACKGROUND-FILL)
@@ -107,6 +108,7 @@
                                       blend-gradient-reverse)
   (begin
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-image-undo-group-start img)
     (apply-blended-logo-effect img logo-layer b-size bg-color
@@ -161,6 +163,8 @@
         (text-layer (car (gimp-text-fontname img -1 0 0 text b-size TRUE size PIXELS font)))
         )
     (gimp-context-push)
+    (gimp-context-set-antialias TRUE)
+    (gimp-context-set-feather FALSE)
 
     (gimp-image-undo-disable img)
     (gimp-context-set-foreground text-color)
@@ -199,4 +203,4 @@
 )
 
 (script-fu-menu-register "script-fu-blended-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/bovinated-logo.scm b/scripts/bovinated-logo.scm
index 5b6f3de..3738e99 100644
--- a/scripts/bovinated-logo.scm
+++ b/scripts/bovinated-logo.scm
@@ -1,9 +1,9 @@
 ; GIMP - The GNU Image Manipulation Program
 ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -12,8 +12,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;
 ;  Bovinated Logos v0.1 04/08/98
 ;  by Brian McFee <keebler wco com>
@@ -36,10 +35,10 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (script-fu-util-image-resize-from-layer img logo-layer)
-    (gimp-image-add-layer img bg-layer 1)
-    (gimp-image-add-layer img blur-layer 1)
+    (script-fu-util-image-add-layers img blur-layer bg-layer)
 
     (gimp-selection-all img)
     (gimp-context-set-background bg-color)
@@ -54,7 +53,7 @@
     (gimp-context-set-background '(191 191 191))
     (gimp-selection-none img)
     (gimp-layer-set-lock-alpha blur-layer FALSE)
-    (gimp-selection-layer-alpha logo-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
     (gimp-edit-fill blur-layer BACKGROUND-FILL)
     (plug-in-gauss-rle RUN-NONINTERACTIVE img blur-layer 5.0 1 1)
     (gimp-selection-none img)
@@ -138,4 +137,4 @@
 )
 
 (script-fu-menu-register "script-fu-bovinated-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/burn-in-anim.scm b/scripts/burn-in-anim.scm
index 3879504..45ee080 100644
--- a/scripts/burn-in-anim.scm
+++ b/scripts/burn-in-anim.scm
@@ -26,23 +26,23 @@
         ;--- main variable: "bl-x" runs from 0 to layer-width
         (bl-x 0)
         (frame-nr 0)
-        (img)
-        (source-layer)
-        (bg-source-layer)
-        (source-layer-width)
-        (bg-layer)
-        (bg-layer-name)
-        (bl-layer)
-        (bl-layer-name)
-        (bl-mask)
-        (bl-layer-width)
-        (bl-height)
-        (bl-x-off)
-        (bl-y-off)
-        (nofadeout-bl-x-off)
-        (nofadeout-bl-width)
-        (blended-layer)
-        (img-display)
+        (img 0)
+        (source-layer 0)
+        (bg-source-layer 0)
+        (source-layer-width 0)
+        (bg-layer 0)
+        (bg-layer-name 0)
+        (bl-layer 0)
+        (bl-layer-name 0)
+        (bl-mask 0)
+        (bl-layer-width 0)
+        (bl-height 0)
+        (bl-x-off 0)
+        (bl-y-off 0)
+        (nofadeout-bl-x-off 0)
+        (nofadeout-bl-width 0)
+        (blended-layer 0)
+        (img-display 0)
         )
 
     (if (< speed 1)
@@ -55,6 +55,7 @@
         ;--- main program structure starts here, begin of "if-1"
         (begin
           (gimp-context-push)
+          (gimp-context-set-defaults)
 
           (set! img (car (gimp-image-duplicate org-img)))
           (gimp-image-undo-disable img)
@@ -65,8 +66,8 @@
           (set! source-layer-width (car (gimp-drawable-width  source-layer)))
 
           ;--- hide layers, cause we want to "merge visible layers" later
-          (gimp-drawable-set-visible source-layer FALSE)
-          (gimp-drawable-set-visible bg-source-layer     FALSE)
+          (gimp-item-set-visible source-layer FALSE)
+          (gimp-item-set-visible bg-source-layer     FALSE)
 
           ;--- process image horizontal with pixel-speed
           (while (< bl-x (+ source-layer-width bl-width))
@@ -74,14 +75,14 @@
               (set! bl-layer-name (string-append "fr-nr"
                                                  (number->string frame-nr 10) ) )
 
-              (gimp-image-add-layer img bl-layer -2)
-              (gimp-drawable-set-name bl-layer bl-layer-name)
-              (gimp-drawable-set-visible bl-layer TRUE)
+              (gimp-image-insert-layer img bl-layer 0 -2)
+              (gimp-item-set-name bl-layer bl-layer-name)
+              (gimp-item-set-visible bl-layer TRUE)
               (gimp-layer-set-lock-alpha bl-layer TRUE)
               (gimp-layer-add-alpha bl-layer)
 
               ;--- add an alpha mask for blending and select it
-              (gimp-selection-layer-alpha bl-layer)
+              (gimp-image-select-item img CHANNEL-OP-REPLACE bl-layer)
               (set! bl-mask (car (gimp-layer-create-mask bl-layer ADD-BLACK-MASK)))
               (gimp-layer-add-mask bl-layer bl-mask)
 
@@ -93,18 +94,18 @@
               (set! bl-y-off             (cadr (gimp-drawable-offsets bl-layer)))
 
               ;--- select a rectangular area to blend
-              (gimp-rect-select img bl-x-off bl-y-off bl-width bl-height CHANNEL-OP-REPLACE 0 0)
+              (gimp-image-select-rectangle img CHANNEL-OP-REPLACE bl-x-off bl-y-off bl-width bl-height)
               ;--- select at least 1 pixel!
-              (gimp-rect-select img bl-x-off bl-y-off (+ bl-width 1) bl-height CHANNEL-OP-ADD 0 0)
+              (gimp-image-select-rectangle img CHANNEL-OP-ADD bl-x-off bl-y-off (+ bl-width 1) bl-height)
 
               (if (= fadeout FALSE)
                   (begin
                     (set! nofadeout-bl-x-off (car (gimp-drawable-offsets bl-layer)))
                     (set! nofadeout-bl-width (+ nofadeout-bl-x-off bl-x))
                     (set! nofadeout-bl-width (max nofadeout-bl-width 1))
-                    (gimp-rect-select img nofadeout-bl-x-off bl-y-off
-                                      nofadeout-bl-width bl-height
-                                      CHANNEL-OP-REPLACE 0 0)
+                    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE
+                                                 nofadeout-bl-x-off bl-y-off
+                                                 nofadeout-bl-width bl-height)
                   )
               )
 
@@ -148,7 +149,7 @@
                    (- (+ bl-x-off bl-width) after-glow) 0)
 
           ;--- add corona effect
-          (gimp-selection-layer-alpha bl-layer)
+          (gimp-image-select-item img CHANNEL-OP-REPLACE bl-layer)
           (gimp-selection-sharpen img)
           (gimp-selection-grow img corona-width)
           (gimp-layer-set-lock-alpha bl-layer FALSE)
@@ -164,16 +165,16 @@
 
               ;--- merge with bg layer
               (set! bg-layer (car (gimp-layer-copy bg-source-layer FALSE)))
-              (gimp-image-add-layer img bg-layer -1)
-              (gimp-image-lower-layer img bg-layer)
+              (gimp-image-insert-layer img bg-layer 0 -1)
+              (gimp-image-lower-item img bg-layer)
               (set! bg-layer-name (string-append "bg-"
                                                  (number->string frame-nr 10)))
-              (gimp-drawable-set-name bg-layer bg-layer-name)
-              (gimp-drawable-set-visible bg-layer TRUE)
+              (gimp-item-set-name bg-layer bg-layer-name)
+              (gimp-item-set-visible bg-layer TRUE)
               (set! blended-layer (car (gimp-image-merge-visible-layers img
                                         CLIP-TO-IMAGE)))
               ;(set! blended-layer bl-layer)
-              (gimp-drawable-set-visible blended-layer FALSE)
+              (gimp-item-set-visible blended-layer FALSE)
 
               ;--- end of "while" loop
               (set! frame-nr (+ frame-nr 1))
@@ -196,7 +197,7 @@
               )
           )
 
-          (gimp-drawable-set-visible (aref (cadr (gimp-image-get-layers img)) 0)
+          (gimp-item-set-visible (aref (cadr (gimp-image-get-layers img)) 0)
                                   TRUE)
           (gimp-image-undo-enable img)
           (gimp-image-clean-all img)
diff --git a/scripts/camo.scm b/scripts/camo.scm
index eb08a87..b90eb4e 100644
--- a/scripts/camo.scm
+++ b/scripts/camo.scm
@@ -4,9 +4,9 @@
 ; Chris Gutteridge (cjg ecs soton ac uk)
 ; At ECS Dept, University of Southampton, England.
 
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -15,8 +15,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 (define (script-fu-camo-pattern inSize inGrain inColor1 inColor2 inColor3 inSmooth inFlatten)
@@ -26,37 +25,37 @@
         (theHeight inSize)
         (theImage (car (gimp-image-new theWidth theHeight RGB)))
         (baseLayer (car (gimp-layer-new theImage theWidth theHeight RGBA-IMAGE "Background" 100 
NORMAL-MODE)))
-        (thickLayer)
-        (thinLayer)
-        (theBlur)
+        (thickLayer 0)
+        (thinLayer 0)
+        (theBlur 0)
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
-    (gimp-image-add-layer theImage baseLayer 0)
+    (gimp-image-insert-layer theImage baseLayer 0 0)
 
     (set! thickLayer (car (gimp-layer-new theImage theWidth theHeight RGBA-IMAGE "Camo Thick Layer" 100 
NORMAL-MODE)))
-    (gimp-image-add-layer theImage thickLayer 0)
+    (gimp-image-insert-layer theImage thickLayer 0 0)
 
     (set! thinLayer (car (gimp-layer-new theImage theWidth theHeight RGBA-IMAGE "Camo Thin Layer" 100 
NORMAL-MODE)))
-    (gimp-image-add-layer theImage thinLayer 0)
+    (gimp-image-insert-layer theImage thinLayer 0 0)
 
     (gimp-selection-all theImage)
     (gimp-context-set-background inColor1)
     (gimp-drawable-fill baseLayer BACKGROUND-FILL)
 
     (plug-in-solid-noise RUN-NONINTERACTIVE
-                        theImage thickLayer 1 0 (rand 65536) 1 inGrain inGrain)
+        theImage thickLayer 1 0 (rand 65536) 1 inGrain inGrain)
     (plug-in-solid-noise RUN-NONINTERACTIVE
-                        theImage thinLayer 1 0 (rand 65536) 1 inGrain inGrain)
+        theImage thinLayer 1 0 (rand 65536) 1 inGrain inGrain)
     (gimp-threshold thickLayer 127 255)
     (gimp-threshold thinLayer 145 255)
 
     (set! theBlur (- 16 inGrain))
 
     (gimp-context-set-background inColor2)
-    (gimp-by-color-select thickLayer
-                         '(0 0 0) 127 CHANNEL-OP-REPLACE TRUE FALSE 0 FALSE)
+    (gimp-image-select-color theImage CHANNEL-OP-REPLACE thickLayer '(0 0 0))
     (gimp-edit-clear thickLayer)
     (gimp-selection-invert theImage)
     (gimp-edit-fill thickLayer BACKGROUND-FILL)
@@ -67,7 +66,7 @@
 
 
     (gimp-context-set-background inColor3)
-    (gimp-by-color-select thinLayer '(0 0 0) 127 CHANNEL-OP-REPLACE  TRUE FALSE 0 FALSE)
+    (gimp-image-select-color theImage CHANNEL-OP-REPLACE thinLayer '(0 0 0))
     (gimp-edit-clear thinLayer)
     (gimp-selection-invert theImage)
     (gimp-edit-fill thinLayer BACKGROUND-FILL)
@@ -109,4 +108,4 @@
 
 
 (script-fu-menu-register "script-fu-camo-pattern"
-                         "<Toolbox>/Xtns/Patterns")
+                         "<Image>/File/Create/Patterns")
diff --git a/scripts/carve-it.scm b/scripts/carve-it.scm
index a6f3cf3..4eae4ef 100644
--- a/scripts/carve-it.scm
+++ b/scripts/carve-it.scm
@@ -58,7 +58,7 @@
         (brush-size (carve-scale size 0.3))
         (mask-fs 0)
         (mask (car (gimp-channel-new img width height "Engraving Mask" 50 '(0 0 0))))
-        (inset-gamma (calculate-inset-gamma (car (gimp-drawable-get-image bg-layer)) bg-layer))
+        (inset-gamma (calculate-inset-gamma (car (gimp-item-get-image bg-layer)) bg-layer))
         (mask-fat 0)
         (mask-emboss 0)
         (mask-highlight 0)
@@ -72,15 +72,16 @@
         (bg-width (car (gimp-drawable-width bg-layer)))
         (bg-height (car (gimp-drawable-height bg-layer)))
         (bg-type (car (gimp-drawable-type bg-layer)))
-        (bg-image (car (gimp-drawable-get-image bg-layer)))
+        (bg-image (car (gimp-item-get-image bg-layer)))
         (layer1 (car (gimp-layer-new img bg-width bg-height bg-type "Layer1" 100 NORMAL-MODE)))
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-image-undo-disable img)
 
-    (gimp-image-add-layer img layer1 0)
+    (gimp-image-insert-layer img layer1 0 0)
 
     (gimp-selection-all img)
     (gimp-edit-clear layer1)
@@ -88,7 +89,7 @@
     (copy-layer-carve-it img layer1 bg-image bg-layer)
 
     (gimp-edit-copy mask-drawable)
-    (gimp-image-add-channel img mask 0)
+    (gimp-image-insert-channel img mask -1 0)
 
     (plug-in-tile RUN-NONINTERACTIVE img layer1 width height FALSE)
     (set! mask-fs (car (gimp-edit-paste mask FALSE)))
@@ -97,28 +98,28 @@
         (gimp-invert mask))
 
     (set! mask-fat (car (gimp-channel-copy mask)))
-    (gimp-image-add-channel img mask-fat 0)
-    (gimp-selection-load mask-fat)
+    (gimp-image-insert-channel img mask-fat -1 0)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE mask-fat)
     (gimp-context-set-brush (carve-brush brush-size))
     (gimp-context-set-foreground '(255 255 255))
     (gimp-edit-stroke mask-fat)
     (gimp-selection-none img)
 
     (set! mask-emboss (car (gimp-channel-copy mask-fat)))
-    (gimp-image-add-channel img mask-emboss 0)
+    (gimp-image-insert-channel img mask-emboss -1 0)
     (plug-in-gauss-rle RUN-NONINTERACTIVE img mask-emboss feather TRUE TRUE)
     (plug-in-emboss RUN-NONINTERACTIVE img mask-emboss 315.0 45.0 7 TRUE)
 
     (gimp-context-set-background '(180 180 180))
-    (gimp-selection-load mask-fat)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE mask-fat)
     (gimp-selection-invert img)
     (gimp-edit-fill mask-emboss BACKGROUND-FILL)
-    (gimp-selection-load mask)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE mask)
     (gimp-edit-fill mask-emboss BACKGROUND-FILL)
     (gimp-selection-none img)
 
     (set! mask-highlight (car (gimp-channel-copy mask-emboss)))
-    (gimp-image-add-channel img mask-highlight 0)
+    (gimp-image-insert-channel img mask-highlight -1 0)
     (gimp-levels mask-highlight 0 180 255 1.0 0 255)
 
     (set! mask-shadow mask-emboss)
@@ -144,16 +145,16 @@
 
     (set! csl-mask (car (gimp-layer-create-mask cast-shadow-layer ADD-BLACK-MASK)))
     (gimp-layer-add-mask cast-shadow-layer csl-mask)
-    (gimp-selection-load mask)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE mask)
     (gimp-context-set-background '(255 255 255))
     (gimp-edit-fill csl-mask BACKGROUND-FILL)
 
     (set! inset-layer (car (gimp-layer-copy layer1 TRUE)))
-    (gimp-image-add-layer img inset-layer 1)
+    (gimp-image-insert-layer img inset-layer 0 1)
 
     (set! il-mask (car (gimp-layer-create-mask inset-layer ADD-BLACK-MASK)))
     (gimp-layer-add-mask inset-layer il-mask)
-    (gimp-selection-load mask)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE mask)
     (gimp-context-set-background '(255 255 255))
     (gimp-edit-fill il-mask BACKGROUND-FILL)
     (gimp-selection-none img)
@@ -164,11 +165,11 @@
     (gimp-image-remove-channel img mask-highlight)
     (gimp-image-remove-channel img mask-shadow)
 
-    (gimp-drawable-set-name layer1 "Carved Surface")
-    (gimp-drawable-set-name shadow-layer "Bevel Shadow")
-    (gimp-drawable-set-name highlight-layer "Bevel Highlight")
-    (gimp-drawable-set-name cast-shadow-layer "Cast Shadow")
-    (gimp-drawable-set-name inset-layer "Inset")
+    (gimp-item-set-name layer1 _"Carved Surface")
+    (gimp-item-set-name shadow-layer _"Bevel Shadow")
+    (gimp-item-set-name highlight-layer _"Bevel Highlight")
+    (gimp-item-set-name cast-shadow-layer _"Cast Shadow")
+    (gimp-item-set-name inset-layer _"Inset")
 
     (gimp-display-new img)
     (gimp-image-undo-enable img)
diff --git a/scripts/carved-logo.scm b/scripts/carved-logo.scm
index 0a40be9..20625a5 100644
--- a/scripts/carved-logo.scm
+++ b/scripts/carved-logo.scm
@@ -51,12 +51,13 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-image-undo-disable img)
 
     (gimp-image-set-filename img "")
 
-    (gimp-image-add-channel img mask 0)
+    (gimp-image-insert-channel img mask -1 0)
 
     (gimp-layer-set-lock-alpha mask-layer TRUE)
     (gimp-context-set-background '(255 255 255))
@@ -76,28 +77,28 @@
     (gimp-image-remove-layer img mask-layer)
 
     (set! mask-fat (car (gimp-channel-copy mask)))
-    (gimp-image-add-channel img mask-fat 0)
-    (gimp-selection-load mask-fat)
+    (gimp-image-insert-channel img mask-fat -1 0)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE mask-fat)
     (gimp-context-set-brush (carve-brush brush-size))
     (gimp-context-set-foreground '(255 255 255))
     (gimp-edit-stroke mask-fat)
     (gimp-selection-none img)
 
     (set! mask-emboss (car (gimp-channel-copy mask-fat)))
-    (gimp-image-add-channel img mask-emboss 0)
+    (gimp-image-insert-channel img mask-emboss -1 0)
     (plug-in-gauss-rle RUN-NONINTERACTIVE img mask-emboss feather TRUE TRUE)
     (plug-in-emboss RUN-NONINTERACTIVE img mask-emboss 315.0 45.0 7 TRUE)
 
     (gimp-context-set-background '(180 180 180))
-    (gimp-selection-load mask-fat)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE mask-fat)
     (gimp-selection-invert img)
     (gimp-edit-fill mask-emboss BACKGROUND-FILL)
-    (gimp-selection-load mask)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE mask)
     (gimp-edit-fill mask-emboss BACKGROUND-FILL)
     (gimp-selection-none img)
 
     (set! mask-highlight (car (gimp-channel-copy mask-emboss)))
-    (gimp-image-add-channel img mask-highlight 0)
+    (gimp-image-insert-channel img mask-highlight -1 0)
     (gimp-levels mask-highlight 0 180 255 1.0 0 255)
 
     (set! mask-shadow mask-emboss)
@@ -123,16 +124,16 @@
 
     (set! csl-mask (car (gimp-layer-create-mask cast-shadow-layer ADD-BLACK-MASK)))
     (gimp-layer-add-mask cast-shadow-layer csl-mask)
-    (gimp-selection-load mask)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE mask)
     (gimp-context-set-background '(255 255 255))
     (gimp-edit-fill csl-mask BACKGROUND-FILL)
 
     (set! inset-layer (car (gimp-layer-copy layer1 TRUE)))
-    (gimp-image-add-layer img inset-layer 1)
+    (gimp-image-insert-layer img inset-layer 0 1)
 
     (set! il-mask (car (gimp-layer-create-mask inset-layer ADD-BLACK-MASK)))
     (gimp-layer-add-mask inset-layer il-mask)
-    (gimp-selection-load mask)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE mask)
     (gimp-context-set-background '(255 255 255))
     (gimp-edit-fill il-mask BACKGROUND-FILL)
     (gimp-selection-none img)
@@ -144,11 +145,11 @@
     (gimp-image-remove-channel img mask-highlight)
     (gimp-image-remove-channel img mask-shadow)
 
-    (gimp-drawable-set-name layer1 "Carved Surface")
-    (gimp-drawable-set-name shadow-layer "Bevel Shadow")
-    (gimp-drawable-set-name highlight-layer "Bevel Highlight")
-    (gimp-drawable-set-name cast-shadow-layer "Cast Shadow")
-    (gimp-drawable-set-name inset-layer "Inset")
+    (gimp-item-set-name layer1 _"Carved Surface")
+    (gimp-item-set-name shadow-layer _"Bevel Shadow")
+    (gimp-item-set-name highlight-layer _"Bevel Highlight")
+    (gimp-item-set-name cast-shadow-layer _"Cast Shadow")
+    (gimp-item-set-name inset-layer _"Inset")
 
     (gimp-display-new img)
     (gimp-image-undo-enable img)
@@ -175,4 +176,4 @@
 )
 
 (script-fu-menu-register "script-fu-carved-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/chalk.scm b/scripts/chalk.scm
index b3027c2..4f613a7 100644
--- a/scripts/chalk.scm
+++ b/scripts/chalk.scm
@@ -1,9 +1,9 @@
 ; GIMP - The GNU Image Manipulation Program
 ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -12,8 +12,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;
 ; chalk.scm  version 0.11  10/10/97
 ;
@@ -33,10 +32,11 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-feather FALSE)
 
     (gimp-selection-none img)
     (script-fu-util-image-resize-from-layer img logo-layer)
-    (gimp-image-add-layer img bg-layer 1)
+    (script-fu-util-image-add-layers img bg-layer)
     (gimp-context-set-background bg-color)
     (gimp-edit-fill bg-layer BACKGROUND-FILL)
 
@@ -46,13 +46,19 @@
     (plug-in-spread RUN-NONINTERACTIVE img logo-layer 5.0 5.0)
     (plug-in-ripple RUN-NONINTERACTIVE img logo-layer 27 2 0 0 0 TRUE TRUE)
     (plug-in-ripple RUN-NONINTERACTIVE img logo-layer 27 2 1 0 0 TRUE TRUE)
-    (plug-in-sobel RUN-NONINTERACTIVE img logo-layer TRUE TRUE TRUE)
-    (gimp-levels logo-layer 0 0 120 3.5 0 255)
 
-    ; work-around for sobel edge detect screw-up (why does this happen?)
-    ; the top line of the image has some garbage instead of the bgcolor
-    (gimp-rect-select img 0 0 width 1 CHANNEL-OP-ADD FALSE 0)
-    (gimp-edit-clear logo-layer)
+    ; sobel doesn't work on a layer with transparency, so merge layers:
+    (let ((logo-layer
+           (car (gimp-image-merge-down img logo-layer EXPAND-AS-NECESSARY))))
+      (plug-in-sobel RUN-NONINTERACTIVE img logo-layer TRUE TRUE TRUE)
+      (gimp-levels logo-layer 0 0 120 3.5 0 255)
+
+      ; work-around for sobel edge detect screw-up (why does this happen?)
+      ; the top line of the image has some garbage instead of the bgcolor
+      (gimp-image-select-rectangle img CHANNEL-OP-ADD 0 0 width 1)
+      (gimp-edit-clear logo-layer)
+      )
+
     (gimp-selection-none img)
 
     (gimp-context-pop)
@@ -121,10 +127,10 @@
   ""
   SF-STRING     _"Text"               "CHALK"
   SF-ADJUSTMENT _"Font size (pixels)" '(150 2 1000 1 10 0 1)
-  SF-FONT       _"Font"               "Cooper"
+  SF-FONT       _"Font"               "Sans"
   SF-COLOR      _"Background color"   "black"
   SF-COLOR      _"Chalk color"        "white"
 )
 
 (script-fu-menu-register "script-fu-chalk-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/chip-away.scm b/scripts/chip-away.scm
index 23c6d00..7bd0ade 100644
--- a/scripts/chip-away.scm
+++ b/scripts/chip-away.scm
@@ -19,9 +19,9 @@
 ;
 ;  see http://www.gimp.org/~adrian/script.html
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -30,8 +30,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;
 ;  Some suggested patterns: Dried mud, 3D green, Slate
 ;
@@ -54,9 +53,10 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (script-fu-util-image-resize-from-layer img logo-layer)
-    (gimp-image-add-layer img bg-layer 1)
+    (script-fu-util-image-add-layers img bump-layer bg-layer)
     (gimp-layer-set-lock-alpha logo-layer TRUE)
     (gimp-context-set-pattern pattern)
 
@@ -70,12 +70,10 @@
         (gimp-edit-fill bg-layer BACKGROUND-FILL)
     )
 
-    (gimp-image-add-layer img bump-layer 1)
-
     (gimp-selection-all img)
     (gimp-edit-clear bump-layer)
     (gimp-selection-none img)
-    (gimp-selection-layer-alpha logo-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
     (gimp-edit-fill bump-layer BACKGROUND-FILL)
     (gimp-edit-bucket-fill logo-layer
                            PATTERN-BUCKET-FILL NORMAL-MODE 100 255 FALSE 1 1)
@@ -83,7 +81,7 @@
 
     (gimp-layer-set-lock-alpha bump-layer FALSE)
     (plug-in-spread RUN-NONINTERACTIVE img bump-layer spread-amount spread-amount)
-    (gimp-selection-layer-alpha bump-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE bump-layer)
     (plug-in-gauss-rle RUN-NONINTERACTIVE img bump-layer blur-amount TRUE TRUE)
 
     (gimp-selection-none img)
@@ -91,16 +89,17 @@
     (plug-in-bump-map RUN-NONINTERACTIVE img logo-layer bump-layer
                       135.00 25.0 60 0 0 0 0 TRUE invert 1)
 
-    (gimp-drawable-set-visible bump-layer FALSE)
+    (gimp-item-set-visible bump-layer FALSE)
 
      (if (= drop-shadow TRUE)
         (begin
           (let* ((shadow-layer (car (gimp-layer-new img width height RGBA-IMAGE "Shadow layer" 100 
NORMAL-MODE))))
-            (gimp-image-add-layer img shadow-layer 1)
+            (gimp-image-set-active-layer img logo-layer)
+            (script-fu-util-image-add-layers img shadow-layer)
             (gimp-selection-all img)
             (gimp-edit-clear shadow-layer)
             (gimp-selection-none img)
-            (gimp-selection-layer-alpha logo-layer)
+            (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
             (gimp-context-set-background '(0 0 0))
             (gimp-edit-fill shadow-layer BACKGROUND-FILL)
             (gimp-selection-none img)
@@ -146,7 +145,7 @@
   "RGBA"
   SF-IMAGE      "Image"                 0
   SF-DRAWABLE   "Drawable"              0
-  SF-ADJUSTMENT _"Chip amount"          '(30 0 250 1 10 0 1)
+  SF-ADJUSTMENT _"Chip amount"          '(30 0 200 1 10 0 1)
   SF-ADJUSTMENT _"Blur amount"          '(3 1 100 1 10 1 0)
   SF-TOGGLE     _"Invert"               FALSE
   SF-TOGGLE     _"Drop shadow"          TRUE
@@ -193,7 +192,7 @@
   SF-STRING     _"Text"                 "Sloth"
   SF-FONT       _"Font"                 "RoostHeavy"
   SF-ADJUSTMENT _"Font size (pixels)"   '(200 2 1000 1 10 0 1)
-  SF-ADJUSTMENT _"Chip amount"          '(30 0 250 1 10 0 1)
+  SF-ADJUSTMENT _"Chip amount"          '(30 0 200 1 10 0 1)
   SF-ADJUSTMENT _"Blur amount"          '(3 1 100 1 10 1 0)
   SF-TOGGLE     _"Invert"               FALSE
   SF-TOGGLE     _"Drop shadow"          TRUE
@@ -204,4 +203,4 @@
 )
 
 (script-fu-menu-register "script-fu-chip-away-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/chrome-it.scm b/scripts/chrome-it.scm
index 581f717..b374221 100644
--- a/scripts/chrome-it.scm
+++ b/scripts/chrome-it.scm
@@ -49,7 +49,9 @@
   )
 
   (define (highlights val)
-    (/ (* 1.108 val) 2.55)
+    ; The result is used as "gimp-color-balance" color parameter
+    ; and thus must be restricted to -100.0 <= highlights <= 100.0.
+    (min (/ (* 1.108 val) 2.55) 100.0)
   )
 
   (define (rval col)
@@ -82,7 +84,7 @@
   )
 
   (let* (
-        (banding-img (car (gimp-file-load 1 env-map env-map)))
+        (banding-img (car (gimp-file-load RUN-NONINTERACTIVE env-map env-map)))
         (banding-layer (car (gimp-image-get-active-drawable banding-img)))
         (banding-height (car (gimp-drawable-height banding-layer)))
         (banding-width (car (gimp-drawable-width banding-layer)))
@@ -98,24 +100,25 @@
         (feather (sota-scale size 0.5 chrome-factor))
         (brush-size (sota-scale size 0.5 chrome-factor))
         (mask (car (gimp-channel-new img width height "Chrome Stencil" 50 '(0 0 0))))
-        (bg-layer (car (gimp-layer-new img width height GRAY-IMAGE "Background" 100 NORMAL-MODE)))
-        (layer1 (car (gimp-layer-new img banding-width banding-height banding-type "Layer1" 100 
NORMAL-MODE)))
-        (layer2 (car (gimp-layer-new img width height GRAYA-IMAGE "Layer 2" 100 DIFFERENCE-MODE)))
-        (layer3 (car (gimp-layer-new img width height GRAYA-IMAGE "Layer 3" 100 NORMAL-MODE)))
-        (shadow (car (gimp-layer-new img width height GRAYA-IMAGE "Drop Shadow" 100 NORMAL-MODE)))
+        (bg-layer (car (gimp-layer-new img width height GRAY-IMAGE _"Background" 100 NORMAL-MODE)))
+        (layer1 (car (gimp-layer-new img banding-width banding-height banding-type _"Layer 1" 100 
NORMAL-MODE)))
+        (layer2 (car (gimp-layer-new img width height GRAYA-IMAGE _"Layer 2" 100 DIFFERENCE-MODE)))
+        (layer3 (car (gimp-layer-new img width height GRAYA-IMAGE _"Layer 3" 100 NORMAL-MODE)))
+        (shadow (car (gimp-layer-new img width height GRAYA-IMAGE _"Drop Shadow" 100 NORMAL-MODE)))
         (mask-fs 0)
         (layer-mask 0)
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-image-undo-disable img)
 
-    (gimp-image-add-channel img mask 0)
-    (gimp-image-add-layer img bg-layer 0)
-    (gimp-image-add-layer img shadow 0)
-    (gimp-image-add-layer img layer3 0)
-    (gimp-image-add-layer img layer2 0)
+    (gimp-image-insert-channel img mask -1 0)
+    (gimp-image-insert-layer img bg-layer 0 0)
+    (gimp-image-insert-layer img shadow 0 0)
+    (gimp-image-insert-layer img layer3 0 0)
+    (gimp-image-insert-layer img layer2 0 0)
 
     (gimp-edit-copy mask-drawable)
     (set! mask-fs (car (gimp-edit-paste mask FALSE)))
@@ -130,10 +133,10 @@
     (gimp-edit-fill layer3 BACKGROUND-FILL)
     (gimp-edit-clear shadow)
 
-    (gimp-drawable-set-visible bg-layer FALSE)
-    (gimp-drawable-set-visible shadow FALSE)
+    (gimp-item-set-visible bg-layer FALSE)
+    (gimp-item-set-visible shadow FALSE)
 
-    (gimp-selection-load mask)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE mask)
     (gimp-context-set-background '(0 0 0))
     (gimp-selection-translate img offx1 offy1)
     (gimp-selection-feather img feather)
@@ -144,23 +147,23 @@
     (set! layer2 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
     (gimp-invert layer2)
 
-    (gimp-image-add-layer img layer1 0)
+    (gimp-image-insert-layer img layer1 0 0)
     (copy-layer-chrome-it img layer1 banding-img banding-layer)
     (gimp-image-delete banding-img)
     (gimp-layer-scale layer1 width height FALSE)
     (plug-in-gauss-iir RUN-NONINTERACTIVE img layer1 10 TRUE TRUE)
     (gimp-layer-set-opacity layer1 50)
     (set! layer1 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
-    (gimp-curves-spline layer1 0 18 (spline-chrome-it))
+    (gimp-curves-spline layer1 HISTOGRAM-VALUE 18 (spline-chrome-it))
 
     (set! layer-mask (car (gimp-layer-create-mask layer1 ADD-BLACK-MASK)))
     (gimp-layer-add-mask layer1 layer-mask)
-    (gimp-selection-load mask)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE mask)
     (gimp-context-set-background '(255 255 255))
     (gimp-edit-fill layer-mask BACKGROUND-FILL)
 
     (set! layer2 (car (gimp-layer-copy layer1 TRUE)))
-    (gimp-image-add-layer img layer2 0)
+    (gimp-image-insert-layer img layer2 0 0)
     (gimp-context-set-brush (brush brush-size))
     (gimp-context-set-foreground '(255 255 255))
     (gimp-edit-stroke layer-mask)
@@ -177,20 +180,26 @@
 
     (gimp-image-convert-rgb img)
 
-    (gimp-color-balance layer1 0 TRUE (shadows (rval hc)) (shadows (gval hc)) (shadows (bval hc)))
-    (gimp-color-balance layer1 1 TRUE (midtones (rval hc)) (midtones (gval hc)) (midtones (bval hc)))
-    (gimp-color-balance layer1 2 TRUE (highlights (rval hc)) (highlights (gval hc)) (highlights (bval hc)))
-
-    (gimp-color-balance layer2 0 TRUE (shadows (rval cc)) (shadows (gval cc)) (shadows (bval cc)))
-    (gimp-color-balance layer2 1 TRUE (midtones (rval cc)) (midtones (gval cc)) (midtones (bval cc)))
-    (gimp-color-balance layer2 2 TRUE (highlights (rval cc)) (highlights (gval cc)) (highlights (bval cc)))
-    (gimp-hue-saturation layer2 0 0 chrome-lightness chrome-saturation)
-
-    (gimp-drawable-set-visible shadow TRUE)
-    (gimp-drawable-set-visible bg-layer TRUE)
-
-    (gimp-drawable-set-name layer2 "Chrome")
-    (gimp-drawable-set-name layer1 "Highlight")
+    (gimp-color-balance layer1 SHADOWS TRUE
+                        (shadows (rval hc)) (shadows (gval hc)) (shadows (bval hc)))
+    (gimp-color-balance layer1 MIDTONES TRUE
+                        (midtones (rval hc)) (midtones (gval hc)) (midtones (bval hc)))
+    (gimp-color-balance layer1 HIGHLIGHTS TRUE
+                        (highlights (rval hc)) (highlights (gval hc)) (highlights (bval hc)))
+
+    (gimp-color-balance layer2 SHADOWS TRUE
+                        (shadows (rval cc)) (shadows (gval cc)) (shadows (bval cc)))
+    (gimp-color-balance layer2 MIDTONES TRUE
+                        (midtones (rval cc)) (midtones (gval cc)) (midtones (bval cc)))
+    (gimp-color-balance layer2 HIGHLIGHTS TRUE
+                        (highlights (rval cc)) (highlights (gval cc)) (highlights (bval cc)))
+    (gimp-hue-saturation layer2 ALL-HUES 0.0 chrome-lightness chrome-saturation)
+
+    (gimp-item-set-visible shadow TRUE)
+    (gimp-item-set-visible bg-layer TRUE)
+
+    (gimp-item-set-name layer2 _"Chrome")
+    (gimp-item-set-name layer1 _"Highlight")
 
     (gimp-image-remove-channel img mask)
 
diff --git a/scripts/chrome-logo.scm b/scripts/chrome-logo.scm
index 67caff7..f5682f0 100644
--- a/scripts/chrome-logo.scm
+++ b/scripts/chrome-logo.scm
@@ -21,23 +21,20 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (script-fu-util-image-resize-from-layer img logo-layer)
-    (gimp-image-add-layer img background 1)
-    (gimp-image-add-layer img shadow 1)
-    (gimp-image-add-layer img layer3 1)
-    (gimp-image-add-layer img layer2 1)
-    (gimp-image-add-layer img layer1 1)
+    (script-fu-util-image-add-layers img layer1 layer2 layer3 shadow background)
     (gimp-context-set-background '(255 255 255))
     (gimp-selection-none img)
     (gimp-edit-fill layer1 BACKGROUND-FILL)
     (gimp-edit-fill layer2 BACKGROUND-FILL)
     (gimp-edit-fill layer3 BACKGROUND-FILL)
     (gimp-edit-clear shadow)
-    (gimp-selection-layer-alpha logo-layer)
-    (gimp-drawable-set-visible logo-layer FALSE)
-    (gimp-drawable-set-visible shadow FALSE)
-    (gimp-drawable-set-visible background FALSE)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
+    (gimp-item-set-visible logo-layer FALSE)
+    (gimp-item-set-visible shadow FALSE)
+    (gimp-item-set-visible background FALSE)
     (gimp-context-set-background '(0 0 0))
     (gimp-edit-fill layer1 BACKGROUND-FILL)
     (gimp-selection-translate img offx1 offy1)
@@ -47,9 +44,14 @@
     (gimp-edit-fill layer3 BACKGROUND-FILL)
     (gimp-selection-none img)
     (set! layer1 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
+    ; if the original image contained more than one visible layer:
+    (while (> (car (gimp-image-get-item-position img layer1))
+              (car (gimp-image-get-item-position img shadow)))
+      (gimp-image-raise-item img layer1)
+    )
     (gimp-invert layer1)
     (gimp-layer-add-mask layer1 layer-mask)
-    (gimp-selection-layer-alpha logo-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
     (gimp-context-set-background '(255 255 255))
     (gimp-selection-feather img feather)
     (gimp-edit-fill layer-mask BACKGROUND-FILL)
@@ -59,9 +61,9 @@
     (gimp-selection-none img)
     (gimp-context-set-background bg-color)
     (gimp-edit-fill background BACKGROUND-FILL)
-    (gimp-drawable-set-visible shadow TRUE)
-    (gimp-drawable-set-visible background TRUE)
-    (gimp-drawable-set-name layer1 (car (gimp-drawable-get-name logo-layer)))
+    (gimp-item-set-visible shadow TRUE)
+    (gimp-item-set-visible background TRUE)
+    (gimp-item-set-name layer1 (car (gimp-item-get-name logo-layer)))
     (gimp-image-remove-layer img logo-layer)
 
     (gimp-context-pop)
@@ -128,4 +130,4 @@
 )
 
 (script-fu-menu-register "script-fu-chrome-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/circuit.scm b/scripts/circuit.scm
index 2624d77..e8421f0 100644
--- a/scripts/circuit.scm
+++ b/scripts/circuit.scm
@@ -14,9 +14,9 @@
 ; limitations in the maze codes selection handling ablity
 ;
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -25,8 +25,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 (define (script-fu-circuit image
@@ -40,18 +39,19 @@
         (type (car (gimp-drawable-type-with-alpha drawable)))
         (image-width (car (gimp-image-width image)))
         (image-height (car (gimp-image-height image)))
-        (active-selection)
-        (from-selection)
-        (selection-bounds)
-        (select-offset-x)
-        (select-offset-y)
-        (select-width)
-        (select-height)
-        (effect-layer)
-        (active-layer)
+        (active-selection 0)
+        (from-selection 0)
+        (selection-bounds 0)
+        (select-offset-x 0)
+        (select-offset-y 0)
+        (select-width 0)
+        (select-height 0)
+        (effect-layer 0)
+        (active-layer 0)
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-image-undo-group-start image)
 
@@ -59,7 +59,7 @@
 
     (if (= (car (gimp-selection-is-empty image)) TRUE)
         (begin
-          (gimp-selection-layer-alpha drawable)
+          (gimp-image-select-item image CHANNEL-OP-REPLACE drawable)
           (set! active-selection (car (gimp-selection-save image)))
           (set! from-selection FALSE))
         (begin
@@ -78,15 +78,15 @@
                                                   select-width
                                                   select-height
                                                   type
-                                                  "effect layer"
+                                                  _"Effect layer"
                                                   100
                                                   NORMAL-MODE)))
 
-          (gimp-image-add-layer image effect-layer -1)
+          (gimp-image-insert-layer image effect-layer 0 -1)
           (gimp-layer-set-offsets effect-layer select-offset-x select-offset-y)
           (gimp-selection-none image)
           (gimp-edit-clear effect-layer)
-          (gimp-selection-load active-selection)
+          (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
           (gimp-edit-copy drawable)
 
           (let ((floating-sel (car (gimp-edit-paste effect-layer FALSE))))
@@ -102,7 +102,7 @@
         (gimp-context-set-foreground '(14 14 14))
     )
 
-    (gimp-selection-load active-selection)
+    (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
     (plug-in-maze RUN-NONINTERACTIVE image active-layer 5 5 TRUE 0 seed 57 1)
     (plug-in-oilify RUN-NONINTERACTIVE image active-layer mask-size 0)
     (plug-in-edge RUN-NONINTERACTIVE image active-layer 2 1 0)
@@ -113,15 +113,7 @@
          (= remove-bg TRUE)
          (= separate-layer TRUE))
         (begin
-          (gimp-by-color-select
-           active-layer
-           '(0 0 0)
-           15
-           2
-           TRUE
-           FALSE
-           10
-           FALSE)
+          (gimp-image-select-color image CHANNEL-OP-REPLACE active-layer '(0 0 0))
           (gimp-edit-clear active-layer)))
 
     (if (= keep-selection FALSE)
diff --git a/scripts/clothify.scm b/scripts/clothify.scm
index 2e0a7e2..b58b5e0 100644
--- a/scripts/clothify.scm
+++ b/scripts/clothify.scm
@@ -11,15 +11,15 @@
         (img (car (gimp-image-new width height RGB)))
 ;       (layer-two (car (gimp-layer-new img width height RGB-IMAGE "Y Dots" 100 MULTIPLY-MODE)))
         (layer-one (car (gimp-layer-new img width height RGB-IMAGE "X Dots" 100 NORMAL-MODE)))
-        (layer-two)
-        (bump-layer)
+        (layer-two 0)
+        (bump-layer 0)
         )
 
     (gimp-context-push)
 
     (gimp-image-undo-disable img)
 
-    (gimp-image-add-layer img layer-one 0)
+    (gimp-image-insert-layer img layer-one 0 0)
 
     (gimp-context-set-background '(255 255 255))
     (gimp-edit-fill layer-one BACKGROUND-FILL)
@@ -28,7 +28,7 @@
 
     (set! layer-two (car (gimp-layer-copy layer-one 0)))
     (gimp-layer-set-mode layer-two MULTIPLY-MODE)
-    (gimp-image-add-layer img layer-two 0)
+    (gimp-image-insert-layer img layer-two 0 0)
 
     (plug-in-gauss-rle RUN-NONINTERACTIVE img layer-one bx TRUE FALSE)
     (plug-in-gauss-rle RUN-NONINTERACTIVE img layer-two by FALSE TRUE)
diff --git a/scripts/coffee.scm b/scripts/coffee.scm
index ecb5a14..2b0eba3 100644
--- a/scripts/coffee.scm
+++ b/scripts/coffee.scm
@@ -1,9 +1,9 @@
 ; Chris Gutteridge (cjg ecs soton ac uk)
 ; At ECS Dept, University of Southampton, England.
 
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -12,8 +12,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 (define (script-fu-coffee-stain inImage inLayer inNumber inDark)
@@ -23,29 +22,31 @@
         (theWidth (car (gimp-image-width theImage)))
         (theNumber inNumber)
         (theSize (min theWidth theHeight))
-        (theStain)
+        (theStain 0)
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-image-undo-group-start theImage)
 
     (while (> theNumber 0)
       (set! theNumber (- theNumber 1))
       (set! theStain (car (gimp-layer-new theImage theSize theSize
-                                          RGBA-IMAGE "Stain" 100
+                                          RGBA-IMAGE _"Stain" 100
                                           (if (= inDark TRUE)
                                               DARKEN-ONLY-MODE NORMAL-MODE))))
 
-      (gimp-image-add-layer theImage theStain 0)
+      (gimp-image-insert-layer theImage theStain 0 0)
       (gimp-selection-all theImage)
       (gimp-edit-clear theStain)
 
       (let ((blobSize (/ (rand (- theSize 40)) (+ (rand 3) 1))))
-        (gimp-ellipse-select theImage
+        (gimp-image-select-ellipse theImage
+                             CHANNEL-OP-REPLACE
                              (/ (- theSize blobSize) 2)
                              (/ (- theSize blobSize) 2)
-                             blobSize blobSize CHANNEL-OP-REPLACE TRUE 0 FALSE)
+                             blobSize blobSize)
       )
 
       (script-fu-distress-selection theImage theStain
diff --git a/scripts/comic-logo.scm b/scripts/comic-logo.scm
index 913bb65..f31d693 100644
--- a/scripts/comic-logo.scm
+++ b/scripts/comic-logo.scm
@@ -1,9 +1,9 @@
 ; GIMP - The GNU Image Manipulation Program
 ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -12,8 +12,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;
 ;  Comic Book Logo v0.1  04/08/98
 ;  by Brian McFee
@@ -40,13 +39,11 @@
     (gimp-context-push)
 
     (script-fu-util-image-resize-from-layer img logo-layer)
-    (gimp-image-add-layer img bg-layer 1)
-    (gimp-image-add-layer img white-layer 1)
+    (script-fu-util-image-add-layers img black-layer white-layer bg-layer)
     (gimp-layer-translate white-layer posx posy)
-    (gimp-drawable-set-name white-layer "White")
-    (gimp-image-add-layer img black-layer 1)
+    (gimp-item-set-name white-layer "White")
     (gimp-layer-translate black-layer posx posy)
-    (gimp-drawable-set-name black-layer "Black")
+    (gimp-item-set-name black-layer "Black")
 
     (gimp-selection-all img)
     (gimp-context-set-background bg-color)
@@ -169,4 +166,4 @@
 )
 
 (script-fu-menu-register "script-fu-comic-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/contactsheet.scm b/scripts/contactsheet.scm
index c3bf885..90cda52 100644
--- a/scripts/contactsheet.scm
+++ b/scripts/contactsheet.scm
@@ -4,9 +4,9 @@
 ; GIMP - The GNU Image Manipulation Program
 ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -15,8 +15,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;
 ; Version 1.0 (July 27, 2004)
 ; Created
@@ -34,15 +33,15 @@
 
   (define (init-sheet-data size)
     (let (
-         (sheet-w)
-         (sheet-h)
-         (thumb-w)
-         (thumb-h)
-         (border-x) ;Space between rows and at top and bottom of thumbnails
-         (border-y) ;Space between columns and at left and right of thumbnails
-         (off-x)  ; Additional X shift to properly center a row of thumbnails
-         (off-y)  ; Additional Y shift to properly center rows of thumbnails
-         (count)
+         (sheet-w 0)
+         (sheet-h 0)
+         (thumb-w 0)
+         (thumb-h 0)
+         (border-x 0) ;Space between rows and at top and bottom of thumbnails
+         (border-y 0) ;Space between columns and at left and right of thumbnails
+         (off-x 0)  ; Additional X shift to properly center a row of thumbnails
+         (off-y 0)  ; Additional Y shift to properly center rows of thumbnails
+         (count 0)
          )
 
       (case size
@@ -108,9 +107,9 @@
 
   (define (init-sheet-img img num img-width border-y off-y)
     (let* (
-          (text-layer)
-          (text-width)
-          (text-height)
+          (text-layer 0)
+          (text-width 0)
+          (text-height 0)
           )
       (gimp-selection-all img)
       (gimp-drawable-fill (car (gimp-image-get-active-layer img))
@@ -155,28 +154,29 @@
         (pos-x 0)
         (pos-y 0)
 
-        (sheet-data)
-        (sheet-width)
-        (sheet-height)
-        (thumb-w)
-        (thumb-h)
-        (border-x)
-        (border-y)
-        (off-x)
-        (off-y)
-        (max-x)
-        (max-y)
-
-        (sheet-img)
-        (sheet-layer)
-
-        (new-img)
-        (file)
-        (file-path)
-        (tmp-layer)
+        (sheet-data 0)
+        (sheet-width 0)
+        (sheet-height 0)
+        (thumb-w 0)
+        (thumb-h 0)
+        (border-x 0)
+        (border-y 0)
+        (off-x 0)
+        (off-y 0)
+        (max-x 0)
+        (max-y 0)
+
+        (sheet-img 0)
+        (sheet-layer 0)
+
+        (new-img 0)
+        (file 0)
+        (file-path 0)
+        (tmp-layer 0)
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
     (gimp-context-set-foreground text-color)
     (gimp-context-set-background bg-color)
 
@@ -202,7 +202,7 @@
     (set! sheet-layer (car (gimp-layer-new sheet-img sheet-width sheet-height
                             RGB-IMAGE "Background"
                             100 NORMAL-MODE)))
-    (gimp-image-add-layer sheet-img sheet-layer 0)
+    (gimp-image-insert-layer sheet-img sheet-layer 0 0)
 
     (init-sheet-img sheet-img sheet-num sheet-width border-y off-y)
 
@@ -230,7 +230,7 @@
                             (car (gimp-image-get-active-drawable new-img))
                                   sheet-img)))
 
-              (gimp-image-add-layer sheet-img tmp-layer 0)
+              (gimp-image-insert-layer sheet-img tmp-layer 0 0)
 
               ;Move thumbnail in to position and center it in area available.
               (gimp-layer-set-offsets tmp-layer
@@ -334,4 +334,4 @@
     SF-COLOR   _"Background color" "black"
 )
 
-(script-fu-menu-register "script-fu-contactsheet" "<Toolbox>/Xtns/_Utilities")
+(script-fu-menu-register "script-fu-contactsheet" "<Image>/Filters/Combine")
diff --git a/scripts/coolmetal-logo.scm b/scripts/coolmetal-logo.scm
index a078af0..47341c0 100644
--- a/scripts/coolmetal-logo.scm
+++ b/scripts/coolmetal-logo.scm
@@ -32,12 +32,14 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
+    (gimp-context-set-feather FALSE)
+    (gimp-context-set-interpolation INTERPOLATION-NONE)
+    (gimp-context-set-transform-resize TRANSFORM-RESIZE-ADJUST)
 
     (gimp-selection-none img)
     (gimp-image-resize img img-width img-height posx posy)
-    (gimp-image-add-layer img bg-layer 1)
-    (gimp-image-add-layer img reflect-layer 1)
-    (gimp-image-add-layer img shadow-layer 1)
+    (script-fu-util-image-add-layers img shadow-layer reflect-layer bg-layer)
     (gimp-layer-set-lock-alpha logo-layer TRUE)
 
     (gimp-context-set-background bg-color)
@@ -53,19 +55,19 @@
                      FALSE 0 0 TRUE
                      0 0 0 (+ height 5))
 
-    (gimp-rect-select img 0 (- (/ height 2) feather) img-width (* 2 feather) CHANNEL-OP-REPLACE 0 0)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 (- (/ height 2) feather) img-width (* 2 feather))
     (plug-in-gauss-iir RUN-NONINTERACTIVE img logo-layer smear TRUE TRUE)
     (gimp-selection-none img)
     (plug-in-ripple RUN-NONINTERACTIVE img logo-layer period amplitude 1 0 1 TRUE FALSE)
     (gimp-layer-translate logo-layer 5 5)
     (gimp-layer-resize logo-layer img-width img-height 5 5)
 
-    (gimp-selection-layer-alpha logo-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
     (set! channel (car (gimp-selection-save img)))
     (gimp-selection-shrink img shrink)
     (gimp-selection-invert img)
     (plug-in-gauss-rle RUN-NONINTERACTIVE img channel feather TRUE TRUE)
-    (gimp-selection-layer-alpha logo-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
     (gimp-selection-invert img)
     (gimp-context-set-background '(0 0 0))
     (gimp-edit-fill channel BACKGROUND-FILL)
@@ -73,27 +75,26 @@
 
     (plug-in-bump-map RUN-NONINTERACTIVE img logo-layer channel 135 45 depth 0 0 0 0 FALSE FALSE 0)
 
-    (gimp-selection-layer-alpha logo-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
     (set! fs (car (gimp-selection-float shadow-layer 0 0)))
     (gimp-edit-clear shadow-layer)
-    (gimp-drawable-transform-perspective-default fs
+    (gimp-item-transform-perspective fs
                       (+ 5 (* 0.15 height)) (- height (* 0.15 height))
                       (+ 5 width (* 0.15 height)) (- height (* 0.15 height))
                       5 height
-                      (+ 5 width) height
-                      FALSE FALSE)
+                      (+ 5 width) height)
     (gimp-floating-sel-anchor fs)
     (plug-in-gauss-rle RUN-NONINTERACTIVE img shadow-layer smear TRUE TRUE)
 
-    (gimp-rect-select img 5 5 width height CHANNEL-OP-REPLACE FALSE 0)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE 5 5 width height)
     (gimp-edit-copy logo-layer)
     (set! fs (car (gimp-edit-paste reflect-layer FALSE)))
     (gimp-floating-sel-anchor fs)
-    (gimp-drawable-transform-scale-default reflect-layer
-                                           0 0 width (* 0.85 height)
-                                           FALSE FALSE)
-    (gimp-drawable-transform-flip-simple reflect-layer ORIENTATION-VERTICAL
-                                         TRUE 0 TRUE)
+    (gimp-item-transform-scale reflect-layer
+                               0 0 width (* 0.85 height))
+    (gimp-context-set-transform-resize TRANSFORM-RESIZE-CLIP)
+    (gimp-item-transform-flip-simple reflect-layer ORIENTATION-VERTICAL
+                                         TRUE 0)
     (gimp-layer-set-offsets reflect-layer 5 (+ 3 height))
 
     (set! layer-mask (car (gimp-layer-create-mask reflect-layer ADD-WHITE-MASK)))
@@ -120,6 +121,14 @@
                                          gradient-reverse)
   (begin
     (gimp-image-undo-group-start img)
+
+    (if (= (car (gimp-layer-is-floating-sel logo-layer)) TRUE)
+        (begin
+            (gimp-floating-sel-to-layer logo-layer)
+            (set! logo-layer (car (gimp-image-get-active-layer img)))
+        )
+     )
+
     (apply-cool-metal-logo-effect img logo-layer size bg-color
                                   gradient gradient-reverse)
     (gimp-image-undo-group-end img)
@@ -181,4 +190,4 @@
 )
 
 (script-fu-menu-register "script-fu-cool-metal-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/crystal-logo.scm b/scripts/crystal-logo.scm
index df66957..5f58c08 100644
--- a/scripts/crystal-logo.scm
+++ b/scripts/crystal-logo.scm
@@ -112,19 +112,20 @@
         (disp-map 0)
         )
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-image-delete back-img)
     (gimp-image-undo-disable img)
     (gimp-image-resize img width height 0 0)
-    (gimp-image-add-layer img layer3 0)
-    (gimp-image-add-layer img layer2 0)
+    (gimp-image-insert-layer img layer3 0 0)
+    (gimp-image-insert-layer img layer2 0 0)
     (gimp-context-set-background '(255 255 255))
     (gimp-selection-none img)
     (gimp-edit-fill layer2 BACKGROUND-FILL)
     (gimp-edit-fill layer3 BACKGROUND-FILL)
-    (gimp-drawable-set-visible text-layer FALSE)
+    (gimp-item-set-visible text-layer FALSE)
 
-    (gimp-selection-layer-alpha text-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
     (gimp-context-set-background '(0 0 0))
     (gimp-selection-translate img offx1 offy1)
     (gimp-selection-feather img feather)
@@ -135,7 +136,7 @@
     (set! layer2 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
     (gimp-invert layer2)
 
-    (gimp-image-add-layer img layer1 0)
+    (gimp-image-insert-layer img layer1 0 0)
     (copy-layer-crystal img layer1 banding-img banding-layer)
     (gimp-image-delete banding-img)
     (gimp-layer-scale layer1 width height FALSE)
@@ -146,7 +147,7 @@
 
     (set! layer-mask (car (gimp-layer-create-mask layer1 ADD-BLACK-MASK)))
     (gimp-layer-add-mask layer1 layer-mask)
-    (gimp-selection-layer-alpha text-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
     (gimp-context-set-background '(255 255 255))
     (gimp-edit-fill layer-mask BACKGROUND-FILL)
 
@@ -164,16 +165,16 @@
 
 
 
-    (gimp-image-add-layer img bg-layer 2)
+    (gimp-image-insert-layer img bg-layer 0 2)
     (copy-layer-crystal img bg-layer tile-img tile-layer)
     (gimp-image-delete tile-img)
     (set! layer2 (car (gimp-layer-copy bg-layer TRUE)))
-    (gimp-image-add-layer img layer2 1)
+    (gimp-image-insert-layer img layer2 0 1)
 
     (plug-in-displace RUN-NONINTERACTIVE img layer2 displace displace TRUE TRUE disp-map disp-map 0)
     (set! layer-mask2 (car (gimp-layer-create-mask layer2 ADD-BLACK-MASK)))
     (gimp-layer-add-mask layer2 layer-mask2)
-    (gimp-selection-layer-alpha text-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
     (gimp-context-set-background '(255 255 255))
     (gimp-edit-fill layer-mask2 BACKGROUND-FILL)
 
@@ -190,11 +191,11 @@
 
     (gimp-image-remove-channel img disp-map)
 
-    (gimp-drawable-set-visible text-layer TRUE)
-    (gimp-drawable-set-name layer1 "Crystal")
-    (gimp-drawable-set-name layer2 "Interior")
-    (gimp-drawable-set-name bg-layer "Background")
-    (gimp-drawable-set-name text-layer "Shadow")
+    (gimp-item-set-visible text-layer TRUE)
+    (gimp-item-set-name layer1 "Crystal")
+    (gimp-item-set-name layer2 "Interior")
+    (gimp-item-set-name bg-layer "Background")
+    (gimp-item-set-name text-layer "Shadow")
 
     (gimp-image-undo-enable img)
     (gimp-display-new img)
@@ -224,4 +225,4 @@
 )
 
 (script-fu-menu-register "script-fu-crystal-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/difference-clouds.scm b/scripts/difference-clouds.scm
index 0836a37..45ac44d 100644
--- a/scripts/difference-clouds.scm
+++ b/scripts/difference-clouds.scm
@@ -1,9 +1,9 @@
 ; Plugin for the GNU Image Manipulation Program
 ; Copyright (C) 2006 Martin Nordholts
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -12,8 +12,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;
 ; Renders Difference Clouds onto a layer, i.e. solid noise merged down with the
 ; Difference Mode
@@ -39,7 +38,7 @@
     (gimp-image-undo-group-start image)
 
     ; Add the cloud layer above the current layer
-    (gimp-image-add-layer image diff-clouds -1)
+    (gimp-image-insert-layer image diff-clouds 0 -1)
 
     ; Clear the layer (so there are no noise in it)
     (gimp-drawable-fill diff-clouds TRANSPARENT-FILL)
@@ -49,7 +48,7 @@
     (set! offset-y (+ draw-offset-y sel-offset-y))
 
     ; Offset the clouds layer
-    (if (gimp-drawable-is-layer drawable)
+    (if (gimp-item-is-layer drawable)
       (gimp-layer-translate diff-clouds offset-x offset-y))
 
     ; Show the solid noise dialog
diff --git a/scripts/distress-selection.scm b/scripts/distress-selection.scm
index 0ca60ac..e2e19dc 100644
--- a/scripts/distress-selection.scm
+++ b/scripts/distress-selection.scm
@@ -5,9 +5,9 @@
 ; Chris Gutteridge (cjg ecs soton ac uk)
 ; At ECS Dept, University of Southampton, England.
 
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -16,8 +16,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 ; Define the function:
 
@@ -34,63 +33,67 @@
        (theImage inImage)
        (theWidth (car (gimp-image-width inImage)))
        (theHeight (car (gimp-image-height inImage)))
-       (theLayer)
+       (theLayer 0)
        (theMode (car (gimp-image-base-type inImage)))
        )
 
-  (gimp-image-undo-group-start theImage)
-  (if (= theMode GRAY)
-    (set! theMode GRAYA-IMAGE)
-    (set! theMode RGBA-IMAGE)
-    )
-  (set! theLayer (car (gimp-layer-new theImage
-                                      theWidth
-                                      theHeight
-                                      theMode
-                                      "Distress Scratch Layer"
-                                      100
-                                      NORMAL-MODE)))
-
-  (gimp-image-add-layer theImage theLayer 0)
-
-  (if (= FALSE (car (gimp-selection-is-empty theImage)))
-      (gimp-edit-fill theLayer BACKGROUND-FILL)
-  )
+    (gimp-context-push)
+    (gimp-context-set-defaults)
+    (gimp-image-undo-group-start theImage)
 
-  (gimp-selection-invert theImage)
+    (if (= theMode GRAY)
+      (set! theMode GRAYA-IMAGE)
+      (set! theMode RGBA-IMAGE)
+    )
+    (set! theLayer (car (gimp-layer-new theImage
+                                        theWidth
+                                        theHeight
+                                        theMode
+                                        "Distress Scratch Layer"
+                                        100
+                                        NORMAL-MODE)))
+
+    (gimp-image-insert-layer theImage theLayer 0 0)
+
+    (if (= FALSE (car (gimp-selection-is-empty theImage)))
+        (gimp-edit-fill theLayer BACKGROUND-FILL)
+    )
 
-  (if (= FALSE (car (gimp-selection-is-empty theImage)))
-      (gimp-edit-clear theLayer)
-  )
+    (gimp-selection-invert theImage)
 
-  (gimp-selection-invert theImage)
-  (gimp-selection-none inImage)
-
-  (gimp-layer-scale theLayer
-                    (/ theWidth inGranu)
-                    (/ theHeight inGranu)
-                    TRUE)
-
-  (plug-in-spread RUN-NONINTERACTIVE
-                  theImage
-                  theLayer
-                  inSpread
-                  inSpread)
-
-  (plug-in-gauss-iir RUN-NONINTERACTIVE
-                    theImage theLayer inSmooth inSmoothH inSmoothV)
-  (gimp-layer-scale theLayer theWidth theHeight TRUE)
-  (plug-in-threshold-alpha RUN-NONINTERACTIVE theImage theLayer inThreshold)
-  (plug-in-gauss-iir RUN-NONINTERACTIVE theImage theLayer 1 TRUE TRUE)
-  (gimp-selection-layer-alpha theLayer)
-  (gimp-image-remove-layer theImage theLayer)
-  (if (and (= (car (gimp-drawable-is-channel inDrawable)) TRUE)
-           (= (car (gimp-drawable-is-layer-mask inDrawable)) FALSE))
-    (gimp-image-set-active-channel theImage inDrawable)
+    (if (= FALSE (car (gimp-selection-is-empty theImage)))
+        (gimp-edit-clear theLayer)
     )
-  (gimp-image-undo-group-end theImage)
 
-  (gimp-displays-flush)
+    (gimp-selection-invert theImage)
+    (gimp-selection-none inImage)
+
+    (gimp-layer-scale theLayer
+                      (/ theWidth inGranu)
+                      (/ theHeight inGranu)
+                      TRUE)
+
+    (plug-in-spread RUN-NONINTERACTIVE
+                    theImage
+                    theLayer
+                    inSpread
+                    inSpread)
+
+    (plug-in-gauss-iir RUN-NONINTERACTIVE
+           theImage theLayer inSmooth inSmoothH inSmoothV)
+    (gimp-layer-scale theLayer theWidth theHeight TRUE)
+    (plug-in-threshold-alpha RUN-NONINTERACTIVE theImage theLayer inThreshold)
+    (plug-in-gauss-iir RUN-NONINTERACTIVE theImage theLayer 1 TRUE TRUE)
+    (gimp-image-select-item inImage CHANNEL-OP-REPLACE theLayer)
+    (gimp-image-remove-layer theImage theLayer)
+    (if (and (= (car (gimp-item-is-channel inDrawable)) TRUE)
+             (= (car (gimp-item-is-layer-mask inDrawable)) FALSE))
+      (gimp-image-set-active-channel theImage inDrawable)
+      )
+    (gimp-image-undo-group-end theImage)
+
+    (gimp-displays-flush)
+    (gimp-context-pop)
   )
 )
 
@@ -104,7 +107,7 @@
   "RGB*,GRAY*"
   SF-IMAGE       "The image"              0
   SF-DRAWABLE    "The layer"              0
-  SF-ADJUSTMENT _"Threshold (bigger 1<-->255 smaller)" '(127 1 255 1 10 0 0)
+  SF-ADJUSTMENT _"Threshold (bigger 1<-->254 smaller)" '(127 1 254 1 10 0 0)
   SF-ADJUSTMENT _"Spread"                 '(8 0 1000 1 10 0 1)
   SF-ADJUSTMENT _"Granularity (1 is low)" '(4 1 25 1 10 0 1)
   SF-ADJUSTMENT _"Smooth"                 '(2 1 150 1 10 0 1)
diff --git a/scripts/drop-shadow.scm b/scripts/drop-shadow.scm
index 1784add..2b77edf 100644
--- a/scripts/drop-shadow.scm
+++ b/scripts/drop-shadow.scm
@@ -1,9 +1,9 @@
 ; GIMP - The GNU Image Manipulation Program
 ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -12,18 +12,18 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;
 ;
-; drop-shadow.scm   version 1.04   1999/12/21
+; drop-shadow.scm   version 1.05   2011/4/21
 ;
 ; CHANGE-LOG:
 ; 1.00 - initial release
 ; 1.01 - fixed the problem with a remaining copy of the selection
 ; 1.02 - some code cleanup, no real changes
 ; 1.03 - can't call gimp-edit-fill until layer is added to image!
-;
+; 1.04
+; 1.05 - replaced deprecated function calls with new ones for 2.8
 ;
 ; Copyright (C) 1997-1999 Sven Neumann <sven gimp org>
 ;
@@ -56,6 +56,7 @@
         )
 
   (gimp-context-push)
+  (gimp-context-set-defaults)
 
   (gimp-image-set-active-layer image drawable)
 
@@ -64,7 +65,7 @@
   (gimp-layer-add-alpha drawable)
   (if (= (car (gimp-selection-is-empty image)) TRUE)
       (begin
-        (gimp-selection-layer-alpha drawable)
+        (gimp-image-select-item image CHANNEL-OP-REPLACE drawable)
         (set! from-selection FALSE))
       (begin
         (set! from-selection TRUE)
@@ -127,7 +128,7 @@
                                             "Drop Shadow"
                                             shadow-opacity
                                             NORMAL-MODE)))
-    (gimp-image-add-layer image shadow-layer -1)
+    (gimp-image-insert-layer image shadow-layer 0 -1)
     (gimp-layer-set-offsets shadow-layer
                             shadow-offset-x
                             shadow-offset-y))
@@ -147,14 +148,14 @@
 
   (if (= from-selection TRUE)
       (begin
-        (gimp-selection-load active-selection)
+        (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
         (gimp-edit-clear shadow-layer)
         (gimp-image-remove-channel image active-selection)))
 
   (if (and
        (= (car (gimp-layer-is-floating-sel drawable)) 0)
        (= from-selection FALSE))
-      (gimp-image-raise-layer image drawable))
+      (gimp-image-raise-item image drawable))
 
   (gimp-image-set-active-layer image drawable)
   (gimp-image-undo-group-end image)
diff --git a/scripts/erase-rows.scm b/scripts/erase-rows.scm
index b29ef38..4c5213a 100644
--- a/scripts/erase-rows.scm
+++ b/scripts/erase-rows.scm
@@ -6,13 +6,16 @@
         (position-y (cadr (gimp-drawable-offsets drawable)))
         )
 
+    (gimp-context-push)
+    (gimp-context-set-feather FALSE)
+
     (gimp-image-undo-group-start img)
     (letrec ((loop (lambda (i max)
                      (if (< i max)
                          (begin
                            (if (= orientation 0)
-                               (gimp-rect-select img position-x (+ i position-y) width 1 CHANNEL-OP-REPLACE 
FALSE 0)
-                               (gimp-rect-select img (+ i position-x) position-y 1 height CHANNEL-OP-REPLACE 
FALSE 0))
+                               (gimp-image-select-rectangle img CHANNEL-OP-REPLACE position-x (+ i 
position-y) width 1)
+                               (gimp-image-select-rectangle img CHANNEL-OP-REPLACE (+ i position-x) 
position-y 1 height))
                            (if (= type 0)
                                (gimp-edit-clear drawable)
                                (gimp-edit-fill drawable BACKGROUND-FILL))
@@ -27,6 +30,7 @@
     )
     (gimp-selection-none img)
     (gimp-image-undo-group-end img)
+    (gimp-context-pop)
     (gimp-displays-flush)
   )
 )
diff --git a/scripts/flatland.scm b/scripts/flatland.scm
index eeb42f5..fe3261b 100644
--- a/scripts/flatland.scm
+++ b/scripts/flatland.scm
@@ -5,9 +5,9 @@
 ; FlatLand - creates a tileable pattern that looks like a map
 ; Copyright (C) 1997 Adrian Likins
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -16,8 +16,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 ;
 ; FlatLand
@@ -38,17 +37,17 @@
         (img (car (gimp-image-new width height RGB)))
         (layer-one (car (gimp-layer-new img width height
                                         RGB-IMAGE "bottom" 100 NORMAL-MODE)))
-        (layer-two)
+        (layer-two 0)
         )
 
     (gimp-image-undo-disable img)
-    (gimp-image-add-layer img layer-one 0)
+    (gimp-image-insert-layer img layer-one 0 0)
    ; (gimp-img-add-layer img layer-two 1)
 
     (plug-in-solid-noise RUN-NONINTERACTIVE img layer-one 1 0 seed detail xscale yscale )
     (plug-in-c-astretch RUN-NONINTERACTIVE img layer-one)
     (set! layer-two (car (gimp-layer-copy layer-one TRUE)))
-    (gimp-image-add-layer img layer-two -1)
+    (gimp-image-insert-layer img layer-two 0 -1)
     (gimp-image-set-active-layer img layer-two)
 
     (plug-in-gradmap RUN-NONINTERACTIVE img layer-two)
@@ -73,4 +72,4 @@
 )
 
 (script-fu-menu-register "script-fu-flatland"
-                         "<Toolbox>/Xtns/Patterns")
+                         "<Image>/File/Create/Patterns")
diff --git a/scripts/font-map.scm b/scripts/font-map.scm
index 9df105b..3183333 100644
--- a/scripts/font-map.scm
+++ b/scripts/font-map.scm
@@ -81,7 +81,7 @@
                                                               GRAY-IMAGE RGB-IMAGE)
                                          "Background" 100 NORMAL-MODE)))
         (count      0)
-        (font)
+        (font       "")
         )
 
     (gimp-context-push)
@@ -93,7 +93,7 @@
           (gimp-context-set-background '(255 255 255))
           (gimp-context-set-foreground '(0 0 0))))
 
-    (gimp-image-add-layer img drawable 0)
+    (gimp-image-insert-layer img drawable 0 0)
     (gimp-edit-clear drawable)
 
     (if (= labels TRUE)
@@ -102,7 +102,7 @@
                                               (if (= colors 0)
                                                   GRAYA-IMAGE RGBA-IMAGE)
                                               "Labels" 100 NORMAL-MODE)))
-          (gimp-image-add-layer img drawable -1)))
+          (gimp-image-insert-layer img drawable 0 -1)))
           (gimp-edit-clear drawable)
 
     (while (< count num-fonts)
diff --git a/scripts/frosty-logo.scm b/scripts/frosty-logo.scm
index ddf598b..b7eb809 100644
--- a/scripts/frosty-logo.scm
+++ b/scripts/frosty-logo.scm
@@ -1,41 +1,54 @@
 ;  FROZEN-TEXT effect
 ;  Thanks to Ed Mackey for this one
-;   Written by Spencer Kimball
+;  Written by Spencer Kimball
 
 (define (apply-frosty-logo-effect img
                                   logo-layer
                                   size
-                                  bg-color)
+                                  bg-color
+                                  isnew) ; The parameter isnew is used
+                                         ; when the script is called
+                                         ; using the logo script (not
+                                         ; alpha to logo), in order to
+                                         ; make sure some actions are
+                                         ; performed only then
   (let* (
         (border (/ size 5))
         (width (+ (car (gimp-drawable-width logo-layer)) border))
         (height (+ (car (gimp-drawable-height logo-layer)) border))
-        (logo-layer-mask (car (gimp-layer-create-mask logo-layer ADD-BLACK-MASK)))
+        (logo-layer-mask (car (gimp-layer-create-mask logo-layer
+                                                      ADD-BLACK-MASK)))
         (sparkle-layer (car (gimp-layer-new img width height RGBA-IMAGE
                                             "Sparkle" 100 NORMAL-MODE)))
         (matte-layer (car (gimp-layer-new img width height RGBA-IMAGE
                                           "Matte" 100 NORMAL-MODE)))
-        (shadow-layer (car (gimp-layer-new img width height RGBA-IMAGE
+        (shadow-layer (car (gimp-layer-new img
+                                           (+ border width)
+                                           (+ border height)
+                                           RGBA-IMAGE
                                            "Shadow" 90 MULTIPLY-MODE)))
         (bg-layer (car (gimp-layer-new img width height RGB-IMAGE
                                        "Background" 100 NORMAL-MODE)))
         (selection 0)
+        (stack (car (gimp-image-get-item-position img logo-layer)))
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
+
+    (if ( = isnew 1) (script-fu-util-image-resize-from-layer img shadow-layer))
 
     (gimp-layer-add-mask logo-layer logo-layer-mask)
-    (script-fu-util-image-resize-from-layer img shadow-layer)
-    (gimp-image-add-layer img sparkle-layer 2)
-    (gimp-image-add-layer img matte-layer 3)
-    (gimp-image-add-layer img shadow-layer 4)
-    (gimp-image-add-layer img bg-layer 5)
-    (gimp-layer-translate logo-layer border border)
+    (gimp-image-insert-layer img sparkle-layer 0 (+ 1 stack))
+    (gimp-image-insert-layer img matte-layer 0 (+ 2 stack))
+    (gimp-image-insert-layer img shadow-layer 0 (+ 3 stack))
+    (gimp-layer-translate shadow-layer (- border) (- border))
+    (gimp-image-insert-layer img bg-layer 0 5)
     (gimp-selection-none img)
     (gimp-edit-clear sparkle-layer)
     (gimp-edit-clear matte-layer)
     (gimp-edit-clear shadow-layer)
-    (gimp-selection-layer-alpha logo-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
     (set! selection (car (gimp-selection-save img)))
     (gimp-selection-feather img border)
     (gimp-context-set-background '(0 0 0))
@@ -48,7 +61,7 @@
                      6 15 1.0 0.0 0.0 0.0 FALSE FALSE FALSE 0)
     (gimp-levels sparkle-layer 1 0 255 0.2 0 255)
     (gimp-levels sparkle-layer 2 0 255 0.7 0 255)
-    (gimp-selection-layer-alpha sparkle-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE sparkle-layer)
     (gimp-context-set-foreground '(0 0 0))
     (gimp-context-set-brush "Circle Fuzzy (11)")
     (gimp-edit-stroke matte-layer)
@@ -59,15 +72,14 @@
     (gimp-edit-fill bg-layer BACKGROUND-FILL)
     (gimp-context-set-background '(0 0 0))
     (gimp-edit-fill logo-layer BACKGROUND-FILL)
-;    (gimp-layer-add-mask logo-layer logo-layer-mask)
-    (gimp-selection-load selection)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
     (gimp-context-set-background '(255 255 255))
     (gimp-edit-fill logo-layer-mask BACKGROUND-FILL)
     (gimp-selection-feather img border)
     (gimp-selection-translate img (/ border 2) (/ border 2))
     (gimp-edit-fill logo-layer BACKGROUND-FILL)
     (gimp-layer-remove-mask logo-layer 0)
-    (gimp-selection-load selection)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
     (gimp-context-set-brush "Circle Fuzzy (07)")
     (gimp-context-set-paint-mode BEHIND-MODE)
     (gimp-context-set-foreground '(186 241 255))
@@ -75,18 +87,11 @@
     (gimp-selection-none img)
     (gimp-image-remove-channel img selection)
 
-    (for-each (lambda (the-layer)
-              (gimp-layer-resize the-layer (- width border) (- height border)
-                                           (- border) (- border))
-              ; (gimp-layer-translate the-layer border border)
-              )
-              (list sparkle-layer matte-layer bg-layer)
-    )
-
-    (gimp-layer-resize shadow-layer (- width border) (- height border) 0 0)
     (gimp-layer-translate shadow-layer border border)
 
-    (script-fu-util-image-resize-from-layer img logo-layer)
+    (if ( = isnew 1) (script-fu-util-image-resize-from-layer img logo-layer))
+
+    (gimp-layer-translate bg-layer (- 0 border) (- 0 border))
 
     (gimp-context-pop)
   )
@@ -96,11 +101,33 @@
                                      logo-layer
                                      size
                                      bg-color)
-  (begin
-    (gimp-image-undo-group-start img)
-    (apply-frosty-logo-effect img logo-layer size bg-color)
-    (gimp-image-undo-group-end img)
-    (gimp-displays-flush)
+
+  (gimp-image-undo-group-start img)
+
+  ;Checking if the effect size is to big or not
+  (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
+  (gimp-selection-feather img (/ size 5))
+  (gimp-selection-sharpen img)
+
+  (if (= 1 (car(gimp-selection-is-empty img)))
+    (begin
+      (gimp-image-undo-group-end img)
+      (gimp-selection-none img)
+      (gimp-message "Your layer's opaque parts are either too small for
+this effect size, or they are not inside the canvas.")
+    )
+  )
+
+  (if (= 0 (car(gimp-selection-is-empty img)))
+    (begin
+      (gimp-selection-none img)
+      (gimp-layer-resize-to-image-size logo-layer)
+      (apply-frosty-logo-effect img logo-layer size bg-color 0)
+
+      (gimp-selection-none img)
+      (gimp-image-undo-group-end img)
+      (gimp-displays-flush)
+    )
   )
 )
 
@@ -129,11 +156,40 @@
         (img (car (gimp-image-new 256 256 RGB)))
         (border (/ size 5))
         (text-layer (car (gimp-text-fontname img -1 0 0 text (* border 2) TRUE size PIXELS font)))
+        (error-string "The text you entered contains only spaces.")
+        )
+
+    (if (= text-layer -1)  ; checking that the text layer was created
+                           ; succesfully - it has more then just
+                           ; empty charcters
+      (begin
+        (gimp-image-delete img)
+        (gimp-message error-string)
+      )
+      (begin     ; Checking if the effect size is too big or not
+        (gimp-image-undo-disable img)
+        (gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
+        (gimp-selection-feather img border)
+        (gimp-selection-sharpen img)
+
+        (if (= 0 (car(gimp-selection-is-empty img))) ; Checking whether
+                                                     ; the effect size
+                                                     ; is too big
+          (begin
+            (apply-frosty-logo-effect img text-layer size bg-color 1)
+            (gimp-selection-all img)
+            (gimp-image-undo-enable img)
+            (gimp-display-new img)
+          )
         )
-    (gimp-image-undo-disable img)
-    (apply-frosty-logo-effect img text-layer size bg-color)
-    (gimp-image-undo-enable img)
-    (gimp-display-new img)
+        (if (= 1 (car(gimp-selection-is-empty img)))
+          (begin
+            (gimp-image-delete img)
+            (gimp-message error-string)
+          )
+        )
+      )
+    )
   )
 )
 
@@ -144,11 +200,11 @@
   "Spencer Kimball & Ed Mackey"
   "1997"
   ""
-  SF-STRING _"Text"                   "GIMP"
-  SF-ADJUSTMENT _"Font size (pixels)" '(100 2 1000 1 10 0 1)
-  SF-FONT   _"Font"                   "Becker"
-  SF-COLOR  _"Background color"       "white"
+  SF-STRING     _"Text"                "GIMP"
+  SF-ADJUSTMENT _"Font size (pixels)"  '(100 2 1000 1 10 0 1)
+  SF-FONT       _"Font"                "Becker"
+  SF-COLOR      _"Background color"    "white"
 )
 
 (script-fu-menu-register "script-fu-frosty-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/fuzzyborder.scm b/scripts/fuzzyborder.scm
index d8d3ba6..54e73e7 100644
--- a/scripts/fuzzyborder.scm
+++ b/scripts/fuzzyborder.scm
@@ -7,9 +7,9 @@
 ; Chris Gutteridge (cjg ecs soton ac uk)
 ; At ECS Dept, University of Southampton, England.
 
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -18,8 +18,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 ; Define the function:
 
@@ -35,14 +34,24 @@
                                 inFlatten
         )
 
+  (define (chris-color-edge inImage inLayer inColor inSize)
+    (gimp-selection-all inImage)
+    (gimp-selection-shrink inImage inSize)
+    (gimp-selection-invert inImage)
+    (gimp-context-set-background inColor)
+    (gimp-edit-fill inLayer BACKGROUND-FILL)
+    (gimp-selection-none inImage)
+  )
+
   (let (
        (theWidth (car (gimp-image-width inImage)))
        (theHeight (car (gimp-image-height inImage)))
-       (theImage)
-       (theLayer)
+       (theImage 0)
+       (theLayer 0)
        )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-selection-all inImage)
     (set! theImage (if (= inCopy TRUE)
@@ -62,7 +71,7 @@
                                         100
                                         NORMAL-MODE)))
 
-    (gimp-image-add-layer theImage theLayer 0)
+    (gimp-image-insert-layer theImage theLayer 0 0)
 
 
     (gimp-edit-clear theLayer)
@@ -81,7 +90,7 @@
     (chris-color-edge theImage theLayer inColor 1)
     (gimp-layer-scale theLayer theWidth theHeight TRUE)
 
-    (gimp-selection-layer-alpha theLayer)
+    (gimp-image-select-item theImage CHANNEL-OP-REPLACE theLayer)
     (gimp-selection-invert theImage)
     (gimp-edit-clear theLayer)
     (gimp-selection-invert theImage)
@@ -93,13 +102,12 @@
 
     (if (= inBlur TRUE)
         (plug-in-gauss-rle RUN-NONINTERACTIVE
-                          theImage theLayer inSize TRUE TRUE)
+                           theImage theLayer inSize TRUE TRUE)
     )
     (if (= inShadow TRUE)
         (begin
-          (gimp-selection-none inImage)
-          (gimp-image-add-layer theImage
-                                (car (gimp-layer-copy theLayer FALSE)) 0)
+          (gimp-image-insert-layer theImage
+                                   (car (gimp-layer-copy theLayer FALSE)) 0 -1)
           (gimp-layer-scale theLayer
                             (- theWidth inSize) (- theHeight inSize) TRUE)
           (gimp-desaturate theLayer)
@@ -134,15 +142,6 @@
   )
 )
 
-(define (chris-color-edge inImage inLayer inColor inSize)
-  (gimp-selection-all inImage)
-  (gimp-selection-shrink inImage inSize)
-  (gimp-selection-invert inImage)
-  (gimp-context-set-background inColor)
-  (gimp-edit-fill inLayer BACKGROUND-FILL)
-  (gimp-selection-none inImage)
-)
-
 (script-fu-register "script-fu-fuzzy-border"
   _"_Fuzzy Border..."
   _"Add a jagged, fuzzy border to an image"
diff --git a/scripts/gimp-online.scm b/scripts/gimp-online.scm
index d5311cd..8186f0e 100644
--- a/scripts/gimp-online.scm
+++ b/scripts/gimp-online.scm
@@ -4,9 +4,9 @@
 ; gimp-online.scm
 ; Copyright (C) 2003  Henrik Brix Andersen <brix gimp org>
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -15,48 +15,47 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 (define (gimp-online-docs-web-site)
-  (plug-in-web-browser "http://docs.gimp.org";)
+  (plug-in-web-browser "http://docs.gimp.org/";)
 )
 
-(define (gimp-help-2-concepts-usage)
+(define (gimp-help-concepts-usage)
   (gimp-help "" "gimp-concepts-usage")
 )
 
-(define (gimp-help-2-using-docks)
+(define (gimp-help-using-docks)
   (gimp-help "" "gimp-using-docks")
 )
 
-(define (gimp-help-2-using-simpleobjects)
+(define (gimp-help-using-simpleobjects)
   (gimp-help "" "gimp-using-simpleobjects")
 )
 
-(define (gimp-help-2-using-selections)
+(define (gimp-help-using-selections)
   (gimp-help "" "gimp-using-selections")
 )
 
-(define (gimp-help-2-using-fileformats)
+(define (gimp-help-using-fileformats)
   (gimp-help "" "gimp-using-fileformats")
 )
 
-(define (gimp-help-2-using-photography)
+(define (gimp-help-using-photography)
   (gimp-help "" "gimp-using-photography")
 )
 
-(define (gimp-help-2-using-web)
+(define (gimp-help-using-web)
   (gimp-help "" "gimp-using-web")
 )
 
-(define (gimp-help-2-concepts-paths)
+(define (gimp-help-concepts-paths)
   (gimp-help "" "gimp-concepts-paths")
 )
 
 
 ; shortcuts to help topics
-(script-fu-register "gimp-help-2-concepts-paths"
+(script-fu-register "gimp-help-concepts-paths"
    _"Using _Paths"
    _"Bookmark to the user manual"
     "Roman Joost <romanofski gimp org>"
@@ -65,11 +64,11 @@
     ""
 )
 
-(script-fu-menu-register "gimp-help-2-concepts-paths"
-                        "<Toolbox>/Help/User Manual")
+(script-fu-menu-register "gimp-help-concepts-paths"
+                        "<Image>/Help/User Manual")
 
 
-(script-fu-register "gimp-help-2-using-web"
+(script-fu-register "gimp-help-using-web"
    _"_Preparing your Images for the Web"
    _"Bookmark to the user manual"
     "Roman Joost <romanofski gimp org>"
@@ -78,11 +77,11 @@
     ""
 )
 
-(script-fu-menu-register "gimp-help-2-using-web"
-                        "<Toolbox>/Help/User Manual")
+(script-fu-menu-register "gimp-help-using-web"
+                        "<Image>/Help/User Manual")
 
 
-(script-fu-register "gimp-help-2-using-photography"
+(script-fu-register "gimp-help-using-photography"
    _"_Working with Digital Camera Photos"
    _"Bookmark to the user manual"
     "Roman Joost <romanofski gimp org>"
@@ -91,11 +90,11 @@
     ""
 )
 
-(script-fu-menu-register "gimp-help-2-using-photography"
-                        "<Toolbox>/Help/User Manual")
+(script-fu-menu-register "gimp-help-using-photography"
+                        "<Image>/Help/User Manual")
 
 
-(script-fu-register "gimp-help-2-using-fileformats"
+(script-fu-register "gimp-help-using-fileformats"
    _"Create, Open and Save _Files"
    _"Bookmark to the user manual"
     "Roman Joost <romanofski gimp org>"
@@ -104,11 +103,11 @@
     ""
 )
 
-(script-fu-menu-register "gimp-help-2-using-fileformats"
-                        "<Toolbox>/Help/User Manual")
+(script-fu-menu-register "gimp-help-using-fileformats"
+                        "<Image>/Help/User Manual")
 
 
-(script-fu-register "gimp-help-2-concepts-usage"
+(script-fu-register "gimp-help-concepts-usage"
    _"_Basic Concepts"
    _"Bookmark to the user manual"
     "Roman Joost <romanofski gimp org>"
@@ -117,11 +116,11 @@
     ""
 )
 
-(script-fu-menu-register "gimp-help-2-concepts-usage"
-                        "<Toolbox>/Help/User Manual")
+(script-fu-menu-register "gimp-help-concepts-usage"
+                        "<Image>/Help/User Manual")
 
 
-(script-fu-register "gimp-help-2-using-docks"
+(script-fu-register "gimp-help-using-docks"
    _"How to Use _Dialogs"
    _"Bookmark to the user manual"
     "Roman Joost <romanofski gimp org>"
@@ -130,11 +129,11 @@
     ""
 )
 
-(script-fu-menu-register "gimp-help-2-using-docks"
-                        "<Toolbox>/Help/User Manual")
+(script-fu-menu-register "gimp-help-using-docks"
+                        "<Image>/Help/User Manual")
 
 
-(script-fu-register "gimp-help-2-using-simpleobjects"
+(script-fu-register "gimp-help-using-simpleobjects"
    _"Drawing _Simple Objects"
    _"Bookmark to the user manual"
     "Roman Joost <romanofski gimp org>"
@@ -143,11 +142,11 @@
     ""
 )
 
-(script-fu-menu-register "gimp-help-2-using-simpleobjects"
-                        "<Toolbox>/Help/User Manual")
+(script-fu-menu-register "gimp-help-using-simpleobjects"
+                        "<Image>/Help/User Manual")
 
 
-(script-fu-register "gimp-help-2-using-selections"
+(script-fu-register "gimp-help-using-selections"
    _"Create and Use _Selections"
    _"Bookmark to the user manual"
     "Roman Joost <romanofski gimp org>"
@@ -156,8 +155,8 @@
     ""
 )
 
-(script-fu-menu-register "gimp-help-2-using-simpleobjects"
-                        "<Toolbox>/Help/User Manual")
+(script-fu-menu-register "gimp-help-using-simpleobjects"
+                        "<Image>/Help/User Manual")
 
 
 ;; Links to GIMP related web sites
@@ -185,7 +184,7 @@
 )
 
 (script-fu-menu-register "gimp-online-main-web-site"
-                         "<Toolbox>/Help/GIMP Online")
+                         "<Image>/Help/GIMP Online")
 
 
 (script-fu-register "gimp-online-developer-web-site"
@@ -198,7 +197,7 @@
 )
 
 (script-fu-menu-register "gimp-online-developer-web-site"
-                         "<Toolbox>/Help/GIMP Online")
+                         "<Image>/Help/GIMP Online")
 
 
 (script-fu-register "gimp-online-docs-web-site"
@@ -211,7 +210,7 @@
 )
 
 (script-fu-menu-register "gimp-online-docs-web-site"
-                         "<Toolbox>/Help/GIMP Online")
+                         "<Image>/Help/GIMP Online")
 
 
 (script-fu-register "gimp-online-plug-in-web-site"
@@ -224,4 +223,4 @@
 )
 
 (script-fu-menu-register "gimp-online-plug-in-web-site"
-                         "<Toolbox>/Help/GIMP Online")
+                         "<Image>/Help/GIMP Online")
diff --git a/scripts/glossy.scm b/scripts/glossy.scm
index 8ccccf8..0df4dd5 100644
--- a/scripts/glossy.scm
+++ b/scripts/glossy.scm
@@ -8,9 +8,9 @@
 ; glossy gives a glossy outlook to your fonts (unlogical name, isn't it?)
 ; Copyright (C) 1998 Hrvoje Horvat
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -19,8 +19,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 (define (apply-glossy-logo-effect img
                                   logo-layer
@@ -47,23 +46,23 @@
         (posy (- (cadr (gimp-drawable-offsets logo-layer))))
         (bg-layer (car (gimp-layer-new img width height RGB-IMAGE "Background" 100 NORMAL-MODE)))
         (grow-me (car (gimp-layer-copy logo-layer TRUE)))
-        (dont-drop-me)
+        (dont-drop-me 0)
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (script-fu-util-image-resize-from-layer img logo-layer)
-    (gimp-drawable-set-name grow-me "Grow-me")
-    (gimp-image-add-layer img grow-me 1)
+    (script-fu-util-image-add-layers img grow-me bg-layer)
+    (gimp-item-set-name grow-me "Grow-me")
     (gimp-layer-translate grow-me posx posy)
-    (gimp-image-add-layer img bg-layer 2)
 
     (gimp-context-set-background bg-color)
     (gimp-selection-all img)
     (gimp-edit-bucket-fill bg-layer BG-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
     (gimp-selection-none img)
 
-    (gimp-selection-layer-alpha logo-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
 
 ; if we are going to use transparent gradients for text, we will (maybe) need to uncomment this
 ; this clears black letters first so you don't end up with black where the transparent should be
@@ -74,7 +73,6 @@
         (gimp-context-set-pattern pattern-text)
         (gimp-edit-bucket-fill logo-layer
                                PATTERN-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
-        (gimp-context-set-pattern old-patterns)
       )
     )
 
@@ -92,7 +90,7 @@
 
     (gimp-selection-none img)
 
-    (gimp-selection-layer-alpha grow-me)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE grow-me)
     (gimp-selection-grow img grow-size)
 
 ; if we are going to use transparent gradients for outline, we will (maybe) need to uncomment this
@@ -106,7 +104,6 @@
         (gimp-edit-bucket-fill grow-me
                                PATTERN-BUCKET-FILL NORMAL-MODE 100
                                0 FALSE 0 0)
-        (gimp-context-set-pattern old-patterns)
       )
     )
 
@@ -124,24 +121,26 @@
 
     (gimp-selection-none img)
 
-    (plug-in-bump-map RUN-NONINTERACTIVE img grow-me logo-layer
+    (plug-in-bump-map (if (= noninteractive TRUE)
+        RUN-NONINTERACTIVE
+        RUN-INTERACTIVE)
+          img grow-me logo-layer
                       110.0 45.0 3 0 0 0 0 TRUE FALSE 0)
     (gimp-layer-set-mode logo-layer SCREEN-MODE)
 
     (if (= use-pattern-overlay TRUE)
       (begin
-        (gimp-selection-layer-alpha grow-me)
+        (gimp-image-select-item img CHANNEL-OP-REPLACE grow-me)
         (gimp-context-set-pattern pattern-overlay)
         (gimp-edit-bucket-fill grow-me PATTERN-BUCKET-FILL
                                OVERLAY-MODE 100 0 FALSE 0 0)
-        (gimp-context-set-pattern old-patterns)
         (gimp-selection-none img)
       )
     )
 
     (if (= shadow-toggle TRUE)
       (begin
-        (gimp-selection-layer-alpha logo-layer)
+        (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
         (set! dont-drop-me (car (script-fu-drop-shadow img logo-layer
                                                        s-offset-x s-offset-y
                                                        15 '(0 0 0) 80 TRUE)))
@@ -293,4 +292,4 @@
 )
 
 (script-fu-menu-register "script-fu-glossy-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/glowing-logo.scm b/scripts/glowing-logo.scm
index 4e853c1..8bfb1e0 100644
--- a/scripts/glowing-logo.scm
+++ b/scripts/glowing-logo.scm
@@ -19,10 +19,10 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (script-fu-util-image-resize-from-layer img logo-layer)
-    (gimp-image-add-layer img bg-layer 1)
-    (gimp-image-add-layer img glow-layer 1)
+    (script-fu-util-image-add-layers img glow-layer bg-layer)
     (gimp-layer-translate glow-layer posx posy)
 
     (gimp-selection-none img)
@@ -33,27 +33,27 @@
     (gimp-context-set-background '(0 0 0))
     (gimp-edit-fill logo-layer BACKGROUND-FILL)
 
-    (gimp-selection-layer-alpha logo-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
     (gimp-selection-feather img feather1)
     (gimp-context-set-background '(221 0 0))
     (gimp-edit-fill glow-layer BACKGROUND-FILL)
     (gimp-edit-fill glow-layer BACKGROUND-FILL)
     (gimp-edit-fill glow-layer BACKGROUND-FILL)
 
-    (gimp-selection-layer-alpha logo-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
     (gimp-selection-feather img feather2)
     (gimp-context-set-background '(232 217 18))
     (gimp-edit-fill glow-layer BACKGROUND-FILL)
     (gimp-edit-fill glow-layer BACKGROUND-FILL)
 
-    (gimp-selection-layer-alpha logo-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
     (gimp-selection-feather img feather3)
     (gimp-context-set-background '(255 255 255))
     (gimp-edit-fill glow-layer BACKGROUND-FILL)
     (gimp-selection-none img)
 
     (gimp-layer-set-mode logo-layer OVERLAY-MODE)
-    (gimp-drawable-set-name glow-layer "Glow Layer")
+    (gimp-item-set-name glow-layer "Glow Layer")
 
     (gimp-context-pop)
   )
@@ -66,7 +66,7 @@
                                       bg-color)
   (begin
     (gimp-image-undo-group-start img)
-    (apply-glowing-logo-effect img logo-layer size bg-color)
+    (apply-glowing-logo-effect img logo-layer (* size 3) bg-color)
     (gimp-image-undo-group-end img)
     (gimp-displays-flush)
   )
@@ -79,10 +79,10 @@
   "Spencer Kimball"
   "1997"
   "RGBA"
-  SF-IMAGE      "Image"                     0
-  SF-DRAWABLE   "Drawable"                  0
-  SF-ADJUSTMENT _"Effect size (pixels * 3)" '(150 2 1000 1 10 0 1)
-  SF-COLOR      _"Background color"         '(7 0 20)
+  SF-IMAGE      "Image"                 0
+  SF-DRAWABLE   "Drawable"              0
+  SF-ADJUSTMENT _"Effect size (pixels)" '(50 1 500 1 10 0 1)
+  SF-COLOR      _"Background color"     '(7 0 20)
 )
 
 (script-fu-menu-register "script-fu-glowing-logo-alpha"
@@ -119,4 +119,4 @@
 )
 
 (script-fu-menu-register "script-fu-glowing-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/gradient-bevel-logo.scm b/scripts/gradient-bevel-logo.scm
index eacc551..6021d24 100644
--- a/scripts/gradient-bevel-logo.scm
+++ b/scripts/gradient-bevel-logo.scm
@@ -1,9 +1,9 @@
 ; GIMP - The GNU Image Manipulation Program
 ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -12,8 +12,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;
 ;  Gradient Bevel v0.1  04/08/98
 ;  by Brian McFee <keebler wco com>
@@ -35,10 +34,10 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (script-fu-util-image-resize-from-layer img logo-layer)
-    (gimp-image-add-layer img bg-layer 1)
-    (gimp-image-add-layer img blur-layer 1)
+    (script-fu-util-image-add-layers img blur-layer bg-layer)
 
     (gimp-selection-all img)
     (gimp-context-set-background bg-color)
@@ -52,7 +51,7 @@
     (gimp-edit-clear blur-layer)
     (gimp-selection-none img)
     (gimp-layer-set-lock-alpha blur-layer FALSE)
-    (gimp-selection-layer-alpha logo-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
     (gimp-edit-fill blur-layer BACKGROUND-FILL)
     (plug-in-gauss-rle RUN-NONINTERACTIVE img blur-layer bevel-width 1 1)
     (gimp-selection-none img)
@@ -146,4 +145,4 @@
 )
 
 (script-fu-menu-register "script-fu-gradient-bevel-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/gradient-example.scm b/scripts/gradient-example.scm
index f15c182..cf85ed1 100644
--- a/scripts/gradient-example.scm
+++ b/scripts/gradient-example.scm
@@ -5,9 +5,9 @@
 ; Copyright (C) 1997 Federico Mena Quintero
 ; federico nuclecu unam mx
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -16,8 +16,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 (define (script-fu-gradient-example width
                                     height
@@ -34,7 +33,7 @@
         )
 
     (gimp-image-undo-disable img)
-    (gimp-image-add-layer img drawable 0)
+    (gimp-image-insert-layer img drawable 0 0)
 
     ; Render background checkerboard
 
diff --git a/scripts/grid-system.scm b/scripts/grid-system.scm
index 80387f8..c3f5f37 100644
--- a/scripts/grid-system.scm
+++ b/scripts/grid-system.scm
@@ -52,9 +52,9 @@
     (gimp-image-undo-group-start img)
 
     (set! grid-layer (car (gimp-layer-copy drw TRUE)))
-    (gimp-image-add-layer img grid-layer 0)
+    (gimp-image-insert-layer img grid-layer 0 0)
     (gimp-edit-clear grid-layer)
-    (gimp-drawable-set-name grid-layer "Grid Layer")
+    (gimp-item-set-name grid-layer "Grid Layer")
 
     (while (not (null? (cdr x-divides)))
       (set! stepped-x (+ stepped-x (car x-divides)))
diff --git a/scripts/guides-from-selection.scm b/scripts/guides-from-selection.scm
index 5814119..8f7c3bc 100644
--- a/scripts/guides-from-selection.scm
+++ b/scripts/guides-from-selection.scm
@@ -34,7 +34,7 @@
   "Alan Horkan"
   "Alan Horkan, 2004.  Public Domain."
   "2004-08-13"
-  ""
+  "*"
   SF-IMAGE    "Image"    0
   SF-DRAWABLE "Drawable" 0
 )
diff --git a/scripts/guides-new-percent.scm b/scripts/guides-new-percent.scm
index 3064974..e5093ef 100644
--- a/scripts/guides-new-percent.scm
+++ b/scripts/guides-new-percent.scm
@@ -29,7 +29,7 @@
   "Alan Horkan"
   "Alan Horkan, 2004"
   "April 2004"
-  ""
+  "*"
   SF-IMAGE      "Input Image"      0
   SF-DRAWABLE   "Input Drawable"   0
   SF-OPTION     _"Direction"       '(_"Horizontal"
diff --git a/scripts/guides-new.scm b/scripts/guides-new.scm
index 4f83826..6cbd64e 100644
--- a/scripts/guides-new.scm
+++ b/scripts/guides-new.scm
@@ -29,7 +29,7 @@
   "Alan Horkan"
   "Alan Horkan, 2004.  Public Domain."
   "2004-04-02"
-  ""
+  "*"
   SF-IMAGE      "Image"      0
   SF-DRAWABLE   "Drawable"   0
   SF-OPTION     _"Direction" '(_"Horizontal" _"Vertical")
diff --git a/scripts/guides-remove-all.scm b/scripts/guides-remove-all.scm
index d3d4986..61cc3ed 100644
--- a/scripts/guides-remove-all.scm
+++ b/scripts/guides-remove-all.scm
@@ -21,7 +21,7 @@
   "Alan Horkan"
   "Alan Horkan, 2004. Public Domain."
   "April 2004"
-  ""
+  "*"
   SF-IMAGE    "Image"    0
   SF-DRAWABLE "Drawable" 0
 )
diff --git a/scripts/i26-gunya2.scm b/scripts/i26-gunya2.scm
index fe4db40..225b4d7 100644
--- a/scripts/i26-gunya2.scm
+++ b/scripts/i26-gunya2.scm
@@ -32,18 +32,19 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-image-undo-disable img)
     (gimp-image-undo-disable distortion-img)
     (gimp-image-resize img width height 0 0)
-    (gimp-image-add-layer img dist-text-layer -1)
-    (gimp-image-add-layer img dist-frame-layer -1)
-    (gimp-image-add-layer distortion-img distortion-layer -1)
+    (gimp-image-insert-layer img dist-text-layer 0 -1)
+    (gimp-image-insert-layer img dist-frame-layer 0 -1)
+    (gimp-image-insert-layer distortion-img distortion-layer 0 -1)
     (gimp-selection-none img)
     (gimp-edit-clear dist-text-layer)
     (gimp-edit-clear dist-frame-layer)
     ;; get the text shape
-    (gimp-selection-layer-alpha text-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
     ;; fill it with the specified color
     (gimp-context-set-foreground text-color)
     (gimp-edit-fill dist-text-layer FOREGROUND-FILL)
@@ -103,4 +104,4 @@
 )
 
 (script-fu-menu-register "script-fu-i26-gunya2"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/land.scm b/scripts/land.scm
index 29ea269..b514cf9 100644
--- a/scripts/land.scm
+++ b/scripts/land.scm
@@ -14,9 +14,9 @@
 ;
 ; Thanks to Quartic for helping me debug this thing.
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -25,8 +25,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 
@@ -35,36 +34,38 @@
         (img (car (gimp-image-new width height RGB)))
         (layer-one (car (gimp-layer-new img width height
                                         RGB-IMAGE "Bottom" 100 NORMAL-MODE)))
-        (layer-two)
+        (layer-two 0)
         )
-  (gimp-context-set-gradient gradient)
-  (gimp-image-undo-disable img)
-  (gimp-image-add-layer img layer-one 0)
 
-  (plug-in-solid-noise RUN-NONINTERACTIVE img layer-one TRUE FALSE seed detail xscale yscale)
-  (plug-in-c-astretch RUN-NONINTERACTIVE img layer-one)
-  (set! layer-two (car (gimp-layer-copy layer-one TRUE)))
-  (gimp-image-add-layer img layer-two -1)
-  (gimp-image-set-active-layer img layer-two)
+    (gimp-context-push)
+    (gimp-context-set-defaults)
+    (gimp-context-set-gradient gradient)
+    (gimp-image-undo-disable img)
+    (gimp-image-insert-layer img layer-one 0 0)
 
-  (plug-in-gradmap RUN-NONINTERACTIVE img layer-two)
+    (plug-in-solid-noise RUN-NONINTERACTIVE img layer-one TRUE FALSE seed detail xscale yscale)
+    (plug-in-c-astretch RUN-NONINTERACTIVE img layer-one)
+    (set! layer-two (car (gimp-layer-copy layer-one TRUE)))
+    (gimp-image-insert-layer img layer-two 0 -1)
+    (gimp-image-set-active-layer img layer-two)
 
+    (plug-in-gradmap RUN-NONINTERACTIVE img layer-two)
 
+    (gimp-image-select-color img CHANNEL-OP-REPLACE layer-one '(190 190 190))
+    (plug-in-bump-map RUN-NONINTERACTIVE img layer-two layer-one 135.0 35 landheight 0 0 0 0 TRUE FALSE 0)
 
-  (gimp-by-color-select layer-one '(190 190 190) 55 CHANNEL-OP-REPLACE FALSE FALSE 0 FALSE)
-  (plug-in-bump-map RUN-NONINTERACTIVE img layer-two layer-one 135.0 35 landheight 0 0 0 0 TRUE FALSE 0)
+    ;(plug-in-c-astretch RUN-NONINTERACTIVE img layer-two)
+    (gimp-selection-invert img)
+    (plug-in-bump-map RUN-NONINTERACTIVE img layer-two layer-one 135.0 35 seadepth 0 0 0 0 TRUE FALSE 0)
 
-  ;(plug-in-c-astretch RUN-NONINTERACTIVE img layer-two)
-  (gimp-selection-invert img)
-  (plug-in-bump-map RUN-NONINTERACTIVE img layer-two layer-one 135.0 35 seadepth 0 0 0 0 TRUE FALSE 0)
+    ;(plug-in-c-astretch RUN-NONINTERACTIVE img layer-two)
 
-  ;(plug-in-c-astretch RUN-NONINTERACTIVE img layer-two)
+    ; uncomment the next line if you want to keep a selection of the "land"
+    (gimp-selection-none img)
 
-  ; uncomment the next line if you want to keep a selection of the "land"
-  (gimp-selection-none img)
-
-  (gimp-display-new img)
-  (gimp-image-undo-enable img)
+    (gimp-display-new img)
+    (gimp-image-undo-enable img)
+    (gimp-context-pop)
   )
 )
 
@@ -87,4 +88,4 @@
 )
 
 (script-fu-menu-register "script-fu-land"
-                         "<Toolbox>/Xtns/Patterns")
+                         "<Image>/File/Create/Patterns")
diff --git a/scripts/lava.scm b/scripts/lava.scm
index 3a2561d..1735711 100644
--- a/scripts/lava.scm
+++ b/scripts/lava.scm
@@ -8,9 +8,9 @@
 ; based on a idea by Sven Riedel <lynx heim8 tu-clausthal de>
 ; tweaked a bit by Sven Neumann <neumanns uni-duesseldorf de>
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -19,8 +19,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 (define (script-fu-lava image
@@ -36,17 +35,18 @@
         (type (car (gimp-drawable-type-with-alpha drawable)))
         (image-width (car (gimp-image-width image)))
         (image-height (car (gimp-image-height image)))
-        (active-selection)
-        (selection-bounds)
-        (select-offset-x)
-        (select-offset-y)
-        (select-width)
-        (select-height)
-        (lava-layer)
-        (active-layer)
+        (active-selection 0)
+        (selection-bounds 0)
+        (select-offset-x 0)
+        (select-offset-y 0)
+        (select-width 0)
+        (select-height 0)
+        (lava-layer 0)
+        (active-layer 0)
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
     (gimp-image-undo-group-start image)
 
     (if (= (car (gimp-drawable-has-alpha drawable)) FALSE)
@@ -54,7 +54,7 @@
     )
 
     (if (= (car (gimp-selection-is-empty image)) TRUE)
-        (gimp-selection-layer-alpha drawable)
+        (gimp-image-select-item image CHANNEL-OP-REPLACE drawable)
     )
 
     (set! active-selection (car (gimp-selection-save image)))
@@ -76,12 +76,12 @@
                                                 100
                                                 NORMAL-MODE)))
 
-          (gimp-image-add-layer image lava-layer -1)
+          (gimp-image-insert-layer image lava-layer 0 -1)
           (gimp-layer-set-offsets lava-layer select-offset-x select-offset-y)
           (gimp-selection-none image)
           (gimp-edit-clear lava-layer)
 
-          (gimp-selection-load active-selection)
+          (gimp-image-select-item image CHANNEL-OP-REPLACE drawable)
           (gimp-image-set-active-layer image lava-layer)
         )
     )
diff --git a/scripts/line-nova.scm b/scripts/line-nova.scm
index 387cfca..e600a53 100644
--- a/scripts/line-nova.scm
+++ b/scripts/line-nova.scm
@@ -19,16 +19,13 @@
         (drw-width (car (gimp-drawable-width drw)))
         (drw-height (car (gimp-drawable-height drw)))
         (drw-offsets (gimp-drawable-offsets drw))
-        (old-selection
-          (if (eq? (car (gimp-selection-is-empty img)) TRUE)
-              #f
-              (car (gimp-selection-save img))
-          )
-        )
+        (old-selection FALSE)
         (radius (max drw-height drw-width))
         (index 0)
         (dir-deg/line (/ 360 num-of-lines))
         )
+    (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (define (draw-vector beg-x beg-y direction)
 
@@ -66,15 +63,19 @@
                     (+ beg-y (* off (sin dir0)))
         )
         (set-marginal-point beg-x beg-y direction)
-        (gimp-free-select img 6 *points* CHANNEL-OP-ADD
-                          TRUE                ; antialias
-                          FALSE                ; feather
-                          0                    ; feather radius
-        )
+        (gimp-image-select-polygon img CHANNEL-OP-ADD 6 *points*)
       )
     )
 
     (gimp-image-undo-group-start img)
+
+    (set! old-selection
+      (if (eq? (car (gimp-selection-is-empty img)) TRUE)
+         #f
+         (car (gimp-selection-save img))
+      )
+    )
+
     (gimp-selection-none img)
     (srand (realtime))
     (while (< index num-of-lines)
@@ -85,26 +86,29 @@
       (set! index (+ index 1))
     )
     (gimp-edit-bucket-fill drw FG-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
+
     (if old-selection
       (begin
-        (gimp-selection-load old-selection)
+        (gimp-image-select-item img CHANNEL-OP-REPLACE old-selection)
         ;; (gimp-image-set-active-layer img drw)
         ;; delete extra channel by Sven Neumann <neumanns uni-duesseldorf de>
         (gimp-image-remove-channel img old-selection)
       )
     )
+
     (gimp-image-undo-group-end img)
     (gimp-displays-flush)
+    (gimp-context-pop)
   )
 )
 
 (script-fu-register "script-fu-line-nova"
   _"Line _Nova..."
-  _"Fill a layer with rays emanating outward from its center using the FG color"
+  _"Fill a layer with rays emanating outward from its center using the foreground color"
   "Shuji Narazaki <narazaki gimp org>"
   "Shuji Narazaki"
   "1997,1998"
-  ""
+  "*"
   SF-IMAGE       "Image"               0
   SF-DRAWABLE    "Drawable"            0
   SF-ADJUSTMENT _"Number of lines"     '(200 40 1000 1 1 0 1)
diff --git a/scripts/mkbrush.scm b/scripts/mkbrush.scm
index 0aea39c..3e745f8 100644
--- a/scripts/mkbrush.scm
+++ b/scripts/mkbrush.scm
@@ -7,9 +7,9 @@
 ; 18-Dec-2000 fixed to work with the new convention (not inverted) of
 ;             gbr saver (jtl gimp org)
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -18,8 +18,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 (define (script-fu-make-brush-rectangular name width height spacing)
@@ -37,14 +36,15 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-image-undo-disable img)
-    (gimp-image-add-layer img drawable 0)
+    (gimp-image-insert-layer img drawable 0 0)
 
     (gimp-context-set-background '(255 255 255))
     (gimp-drawable-fill drawable BACKGROUND-FILL)
 
-    (gimp-rect-select img 0 0 width height CHANNEL-OP-REPLACE FALSE 0)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 0 width height)
 
     (gimp-context-set-background '(0 0 0))
     (gimp-edit-fill drawable BACKGROUND-FILL)
@@ -98,17 +98,21 @@
     (gimp-context-push)
 
     (gimp-image-undo-disable img)
-    (gimp-image-add-layer img drawable 0)
+    (gimp-image-insert-layer img drawable 0 0)
 
     (gimp-context-set-background '(255 255 255))
     (gimp-drawable-fill drawable BACKGROUND-FILL)
 
-    (cond ((< 0 feathering)
-     (gimp-rect-select img
-           (/ feathering 2) (/ feathering 2)
-           width height CHANNEL-OP-REPLACE TRUE feathering))
-    ((>= 0 feathering)
-     (gimp-rect-select img 0 0 width height CHANNEL-OP-REPLACE FALSE 0)))
+    (cond
+      ((< 0 feathering)
+       (gimp-context-set-feather TRUE)
+       (gimp-context-set-feather-radius feathering feathering)
+       (gimp-image-select-rectangle img CHANNEL-OP-REPLACE
+           (/ feathering 2) (/ feathering 2) width height))
+      ((>= 0 feathering)
+      (gimp-context-set-feather FALSE)
+      (gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 0 width height))
+    )
 
     (gimp-context-set-background '(0 0 0))
     (gimp-edit-fill drawable BACKGROUND-FILL)
@@ -156,14 +160,16 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-antialias TRUE)
+    (gimp-context-set-feather FALSE)
 
     (gimp-image-undo-disable img)
-    (gimp-image-add-layer img drawable 0)
+    (gimp-image-insert-layer img drawable 0 0)
 
     (gimp-context-set-background '(255 255 255))
     (gimp-drawable-fill drawable BACKGROUND-FILL)
     (gimp-context-set-background '(0 0 0))
-    (gimp-ellipse-select img 0 0 width height CHANNEL-OP-REPLACE TRUE FALSE 0)
+    (gimp-image-select-ellipse img CHANNEL-OP-REPLACE 0 0 width height)
 
     (gimp-edit-fill drawable BACKGROUND-FILL)
 
@@ -215,21 +221,23 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-antialias TRUE)
 
     (gimp-image-undo-disable img)
-    (gimp-image-add-layer img drawable 0)
+    (gimp-image-insert-layer img drawable 0 0)
 
     (gimp-context-set-background '(255 255 255))
     (gimp-drawable-fill drawable BACKGROUND-FILL)
 
     (cond ((> feathering 0)   ; keep from taking out gimp with stupid entry.
-        (gimp-ellipse-select img
+        (gimp-context-set-feather TRUE)
+        (gimp-context-set-feather-radius feathering feathering)
+        (gimp-image-select-ellipse img CHANNEL-OP-REPLACE
            (/ feathering 2) (/ feathering 2)
-           width height CHANNEL-OP-REPLACE
-           TRUE TRUE feathering))
+           width height))
           ((<= feathering 0)
-        (gimp-ellipse-select img 0 0 width height
-           CHANNEL-OP-REPLACE TRUE FALSE 0)))
+        (gimp-context-set-feather FALSE)
+        (gimp-image-select-ellipse img CHANNEL-OP-REPLACE 0 0 width height)))
 
     (gimp-context-set-background '(0 0 0))
     (gimp-edit-fill drawable BACKGROUND-FILL)
diff --git a/scripts/neon-logo.scm b/scripts/neon-logo.scm
index 3e7c8c5..58bdcec 100644
--- a/scripts/neon-logo.scm
+++ b/scripts/neon-logo.scm
@@ -1,9 +1,9 @@
 ; GIMP - The GNU Image Manipulation Program
 ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -12,8 +12,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;
 ; NEON
 ; Create a text effect that simulates neon lighting
@@ -26,68 +25,68 @@
                                 shadow)
 
   (define (set-pt a index x y)
-       (begin
-        (aset a (* index 2) x)
-        (aset a (+ (* index 2) 1) y)))
+    (begin
+      (aset a (* index 2) x)
+      (aset a (+ (* index 2) 1) y)))
 
   (define (neon-spline1)
-       (let* ((a (cons-array 6 'byte)))
-         (set-pt a 0 0 0)
-         (set-pt a 1 127 145)
-         (set-pt a 2 255 255)
-         a))
+    (let* ((a (cons-array 6 'byte)))
+      (set-pt a 0 0 0)
+      (set-pt a 1 127 145)
+      (set-pt a 2 255 255)
+      a))
 
   (define (neon-spline2)
-       (let* ((a (cons-array 6 'byte)))
-         (set-pt a 0 0 0)
-         (set-pt a 1 110 150)
-         (set-pt a 2 255 255)
-         a))
+    (let* ((a (cons-array 6 'byte)))
+      (set-pt a 0 0 0)
+      (set-pt a 1 110 150)
+      (set-pt a 2 255 255)
+      a))
 
   (define (neon-spline3)
-       (let* ((a (cons-array 6 'byte)))
-         (set-pt a 0 0 0)
-         (set-pt a 1 100 185)
-         (set-pt a 2 255 255)
-         a))
+    (let* ((a (cons-array 6 'byte)))
+      (set-pt a 0 0 0)
+      (set-pt a 1 100 185)
+      (set-pt a 2 255 255)
+      a))
 
   (define (neon-spline4)
-       (let* ((a (cons-array 8 'byte)))
-         (set-pt a 0 0 0)
-         (set-pt a 1 64 64)
-         (set-pt a 2 127 192)
-         (set-pt a 3 255 255)
-         a))
+    (let* ((a (cons-array 8 'byte)))
+      (set-pt a 0 0 0)
+      (set-pt a 1 64 64)
+      (set-pt a 2 127 192)
+      (set-pt a 3 255 255)
+      a))
 
   (define (find-hue-offset color)
-       (let* (
-                 (R (car color))
-                 (G (cadr color))
-                 (B (caddr color))
-                 (max-val (max R G B))
-                 (min-val (min R G B))
-                 (delta (- max-val min-val))
-                 (hue 0)
-                 )
-         (if (= delta 0)
-                 0
-                 (begin
-                       (cond
-                         ((= max-val R)
-                          (set! hue (/ (- G B) (* 1.0 delta))))
-                         ((= max-val G)
-                          (set! hue (+ 2 (/ (- B R) (* 1.0 delta)))))
-                         ((= max-val B)
-                          (set! hue (+ 4 (/ (- R G) (* 1.0 delta)))))
-                       )
-                       (set! hue (* hue 60))
-                       (if (< hue 0) (set! hue (+ hue 360)))
-                       (if (> hue 360) (set! hue (- hue 360)))
-                       (if (> hue 180) (set! hue (- hue 360)))
-                       hue
-                 )
-         )
-       )
+    (let* (
+          (R (car color))
+          (G (cadr color))
+          (B (caddr color))
+          (max-val (max R G B))
+          (min-val (min R G B))
+          (delta (- max-val min-val))
+          (hue 0)
+          )
+      (if (= delta 0)
+        0
+        (begin
+          (cond
+            ((= max-val R)
+             (set! hue (/ (- G B) (* 1.0 delta))))
+            ((= max-val G)
+             (set! hue (+ 2 (/ (- B R) (* 1.0 delta)))))
+            ((= max-val B)
+             (set! hue (+ 4 (/ (- R G) (* 1.0 delta)))))
+          )
+          (set! hue (* hue 60))
+          (if (< hue 0) (set! hue (+ hue 360)))
+          (if (> hue 360) (set! hue (- hue 360)))
+          (if (> hue 180) (set! hue (- hue 360)))
+          hue
+        )
+      )
+    )
   )
 
   (let* (
@@ -105,53 +104,53 @@
         (width (car (gimp-drawable-width tube-layer)))
         (height (car (gimp-drawable-height tube-layer)))
         (glow-layer (car (gimp-layer-new img width height RGBA-IMAGE
-                                        "Neon Glow" 100 NORMAL-MODE)))
+                                         "Neon Glow" 100 NORMAL-MODE)))
         (bg-layer (car (gimp-layer-new img width height RGB-IMAGE
-                                      "Background" 100 NORMAL-MODE)))
+                                       "Background" 100 NORMAL-MODE)))
         (shadow-layer (if (= shadow TRUE)
                           (car (gimp-layer-new img width height RGBA-IMAGE
-                                              "Shadow" 100 NORMAL-MODE))
+                                               "Shadow" 100 NORMAL-MODE))
                           0))
         (selection 0)
-       (max_shrink 0)
+        (max_shrink 0)
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     ; ensure that we don't shrink selection so much
     ; that we create an empty selection.
-    (gimp-selection-layer-alpha tube-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE tube-layer)
     (while (= (car (gimp-selection-is-empty img)) FALSE)
-       (begin
-         (gimp-selection-shrink img 1)
-          (set! max_shrink (+ max_shrink 1))
-          ; escape early if we know that we can perform
-         ; as much shrink steps as we want
-         (if (> max_shrink shrink)
-             (gimp-selection-none img))
-       )
+      (begin
+        (gimp-selection-shrink img 1)
+              (set! max_shrink (+ max_shrink 1))
+              ; escape early if we know that we can perform
+        ; as much shrink steps as we want
+        (if (> max_shrink shrink)
+            (gimp-selection-none img))
+      )
     )
     (if (= (car (gimp-selection-is-empty img)) TRUE)
-       (if (> max_shrink 0)
-           (set! max_shrink (- max_shrink 1))))
+      (if (> max_shrink 0)
+          (set! max_shrink (- max_shrink 1))))
     ; clamp upper bounds to valid shrink step range
     (if (> shrink max_shrink)
-       (set! shrink max_shrink))
+      (set! shrink max_shrink))
     (if (> inc-shrink (/ max_shrink 3))
-       (set! inc-shrink (/ max_shrink 3)))
+      (set! inc-shrink (/ max_shrink 3)))
     (if (> shadow-shrink max_shrink)
-       (set! shadow-shrink max_shrink))
+      (set! shadow-shrink max_shrink))
 
     (script-fu-util-image-resize-from-layer img tube-layer)
-    (gimp-image-add-layer img bg-layer 1)
+    (script-fu-util-image-add-layers img glow-layer bg-layer)
     (if (not (= shadow 0))
         (begin
-          (gimp-image-add-layer img shadow-layer 1)
+          (gimp-image-insert-layer img shadow-layer 0 -1)
           (gimp-edit-clear shadow-layer)))
-    (gimp-image-add-layer img glow-layer 1)
 
     (gimp-context-set-background '(0 0 0))
-    (gimp-selection-layer-alpha tube-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE tube-layer)
     (set! selection (car (gimp-selection-save img)))
     (gimp-selection-none img)
 
@@ -161,7 +160,7 @@
     (gimp-context-set-background bg-color)
     (gimp-edit-fill bg-layer BACKGROUND-FILL)
 
-    (gimp-selection-load selection)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
     (gimp-context-set-background '(255 255 255))
     (gimp-edit-fill tube-layer BACKGROUND-FILL)
     (gimp-selection-shrink img shrink)
@@ -171,27 +170,27 @@
 
     (gimp-selection-none img)
     (if (not (= feather1 0))
-       (plug-in-gauss-rle RUN-NONINTERACTIVE img tube-layer feather1 TRUE TRUE))
-    (gimp-selection-load selection)
+      (plug-in-gauss-rle RUN-NONINTERACTIVE img tube-layer feather1 TRUE TRUE))
+    (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
     (if (not (= feather2 0))
-       (plug-in-gauss-rle RUN-NONINTERACTIVE img tube-layer feather2 TRUE TRUE))
+      (plug-in-gauss-rle RUN-NONINTERACTIVE img tube-layer feather2 TRUE TRUE))
 
     (gimp-selection-feather img inc-shrink)
     (gimp-selection-shrink img inc-shrink)
     (gimp-curves-spline tube-layer 4 6 (neon-spline1))
 
-    (gimp-selection-load selection)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
     (gimp-selection-feather img inc-shrink)
     (gimp-selection-shrink img (* inc-shrink 2))
     (gimp-curves-spline tube-layer 4 6 (neon-spline2))
 
-    (gimp-selection-load selection)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
     (gimp-selection-feather img inc-shrink)
     (gimp-selection-shrink img (* inc-shrink 3))
     (gimp-curves-spline tube-layer 4 6 (neon-spline3))
 
     (gimp-layer-set-lock-alpha tube-layer 1)
-    (gimp-selection-layer-alpha tube-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE tube-layer)
     (gimp-selection-invert img)
     (gimp-context-set-background glow-color)
     (gimp-edit-fill tube-layer BACKGROUND-FILL)
@@ -200,7 +199,7 @@
     (gimp-layer-set-lock-alpha tube-layer 0)
     (gimp-curves-spline tube-layer 4 8 (neon-spline4))
 
-    (gimp-selection-load selection)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
     (gimp-selection-grow img grow)
     (gimp-selection-invert img)
     (gimp-edit-clear tube-layer)
@@ -211,7 +210,7 @@
 
     (if (not (= shadow 0))
         (begin
-          (gimp-selection-load selection)
+          (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
           (gimp-selection-grow img grow)
           (gimp-selection-shrink img shadow-shrink)
           (gimp-selection-feather img shadow-feather)
@@ -220,7 +219,7 @@
           (gimp-edit-fill shadow-layer BACKGROUND-FILL)))
     (gimp-selection-none img)
 
-    (gimp-drawable-set-name tube-layer "Neon Tubes")
+    (gimp-item-set-name tube-layer "Neon Tubes")
     (gimp-image-remove-channel img selection)
 
     (gimp-context-pop)
@@ -235,7 +234,7 @@
                                    shadow)
   (begin
     (gimp-image-undo-group-start img)
-    (apply-neon-logo-effect img tube-layer size bg-color glow-color shadow)
+    (apply-neon-logo-effect img tube-layer (* size 5) bg-color glow-color shadow)
     (gimp-image-undo-group-end img)
     (gimp-displays-flush)
   )
@@ -248,12 +247,12 @@
   "Spencer Kimball"
   "1997"
   "RGBA"
-  SF-IMAGE      "Image"                     0
-  SF-DRAWABLE   "Drawable"                  0
-  SF-ADJUSTMENT _"Effect size (pixels * 5)" '(150 2 1000 1 10 0 1)
-  SF-COLOR      _"Background color"         "black"
-  SF-COLOR      _"Glow color"               '(38 211 255)
-  SF-TOGGLE     _"Create shadow"            FALSE
+  SF-IMAGE      "Image"                 0
+  SF-DRAWABLE   "Drawable"              0
+  SF-ADJUSTMENT _"Effect size (pixels)" '(30 1 200 1 10 0 1)
+  SF-COLOR      _"Background color"     "black"
+  SF-COLOR      _"Glow color"           '(38 211 255)
+  SF-TOGGLE     _"Create shadow"        FALSE
 )
 
 (script-fu-menu-register "script-fu-neon-logo-alpha"
@@ -293,4 +292,4 @@
 )
 
 (script-fu-menu-register "script-fu-neon-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/news-text.scm b/scripts/news-text.scm
index e9abc2e..b9c8f8f 100644
--- a/scripts/news-text.scm
+++ b/scripts/news-text.scm
@@ -4,9 +4,9 @@
 ;
 ; Based on alien glow code from Adrian Likins
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -15,8 +15,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 (define (script-fu-newsprint-text string font font-size cell-size
@@ -33,10 +32,11 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-image-undo-disable img)
-    (gimp-image-add-layer img bg-layer 1)
-    (gimp-image-add-layer img text-layer -1)
+    (gimp-image-insert-layer img bg-layer 0 1)
+    (gimp-image-insert-layer img text-layer 0 -1)
 
     (gimp-context-set-background bg-color)
     (gimp-edit-clear bg-layer)
@@ -51,7 +51,7 @@
     (set! text-mask (car (gimp-layer-create-mask text-layer ADD-ALPHA-MASK)))
     (gimp-layer-add-mask text-layer text-mask)
 
-    (gimp-selection-layer-alpha text-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
     (gimp-context-set-background (list grey grey grey))
     (gimp-edit-fill text-mask BACKGROUND-FILL)
     (gimp-selection-none img)
@@ -91,4 +91,4 @@
 )
 
 (script-fu-menu-register "script-fu-newsprint-text"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/old-photo.scm b/scripts/old-photo.scm
index c571cf4..ab51978 100644
--- a/scripts/old-photo.scm
+++ b/scripts/old-photo.scm
@@ -5,9 +5,9 @@
 ; Chris Gutteridge (cjg ecs soton ac uk)
 ; At ECS Dept, University of Southampton, England.
 
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -16,8 +16,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;
 ; Branko Collin <collin xs4all nl> added the possibility to change
 ; the border size in October 2001.
@@ -26,10 +25,10 @@
 
 (define (script-fu-old-photo inImage inLayer inDefocus inBorderSize inSepia inMottle inCopy)
   (let (
-       (theImage)
-       (theLayer)
-       (theWidth)
-       (theHeight)
+       (theImage 0)
+       (theLayer 0)
+       (theWidth 0)
+       (theHeight 0)
        )
   (gimp-image-undo-group-start inImage)
   (gimp-selection-all inImage)
@@ -63,7 +62,7 @@
                                         100 DARKEN-ONLY-MODE)))
            )
 
-             (gimp-image-add-layer theImage mLayer 0)
+             (gimp-image-insert-layer theImage mLayer 0 0)
              (gimp-selection-all theImage)
              (gimp-edit-clear mLayer)
              (gimp-selection-none theImage)
diff --git a/scripts/paste-as-brush.scm b/scripts/paste-as-brush.scm
index 20814de..19a3a49 100644
--- a/scripts/paste-as-brush.scm
+++ b/scripts/paste-as-brush.scm
@@ -4,9 +4,9 @@
 ; script-fu-paste-as-brush
 ; Based on select-to-brush by Copyright (c) 1997 Adrian Likins
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -15,8 +15,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 (define (script-fu-paste-as-brush name filename spacing)
diff --git a/scripts/paste-as-pattern.scm b/scripts/paste-as-pattern.scm
index 7ebd471..4188e10 100644
--- a/scripts/paste-as-pattern.scm
+++ b/scripts/paste-as-pattern.scm
@@ -4,9 +4,9 @@
 ; script-fu-paste-as-pattern
 ; Based on select-to-pattern by Cameron Gregory, http://www.flamingtext.com/
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -15,8 +15,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 (define (script-fu-paste-as-pattern name filename)
diff --git a/scripts/perspective-shadow.scm b/scripts/perspective-shadow.scm
index 0389cf3..7a42146 100644
--- a/scripts/perspective-shadow.scm
+++ b/scripts/perspective-shadow.scm
@@ -1,9 +1,9 @@
 ; GIMP - The GNU Image Manipulation Program
 ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -12,8 +12,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;
 ;
 ; perspective-shadow.scm   version 1.2   2000/11/08
@@ -49,146 +48,149 @@
         (shadow-layer 0)
         )
 
-  (gimp-context-push)
-
-  (if (> rel-distance 24) (set! rel-distance 999999))
-  (if (= rel-distance rel-length) (set! rel-distance (+ rel-distance 0.01)))
-
-  (gimp-image-undo-group-start image)
-
-  (gimp-layer-add-alpha drawable)
-  (if (= (car (gimp-selection-is-empty image)) TRUE)
-      (begin
-        (gimp-selection-layer-alpha drawable)
-        (set! from-selection FALSE))
-      (begin
-        (set! from-selection TRUE)
-        (set! active-selection (car (gimp-selection-save image)))))
-
-  (let* ((selection-bounds (gimp-selection-bounds image))
-         (select-offset-x (cadr selection-bounds))
-         (select-offset-y (caddr selection-bounds))
-         (select-width (- (cadr (cddr selection-bounds)) select-offset-x))
-         (select-height (- (caddr (cddr selection-bounds)) select-offset-y))
-
-         (abs-length (* rel-length select-height))
-         (abs-distance (* rel-distance select-height))
-         (half-bottom-width (/ select-width 2))
-         (half-top-width (* half-bottom-width
-                          (/ (- rel-distance rel-length) rel-distance)))
-
-         (x0 (+ select-offset-x (+ (- half-bottom-width half-top-width)
-                                 (* (cos alpha) abs-length))))
-         (y0 (+ select-offset-y (- select-height
-                                 (* (sin alpha) abs-length))))
-         (x1 (+ x0 (* 2 half-top-width)))
-         (y1 y0)
-         (x2 select-offset-x)
-         (y2 (+ select-offset-y select-height))
-         (x3 (+ x2 select-width))
-         (y3 y2)
-
-         (shadow-width (+ (- (max x1 x3) (min x0 x2)) (* 2 shadow-blur)))
-         (shadow-height (+ (- (max y1 y3) (min y0 y2)) (* 2 shadow-blur)))
-         (shadow-offset-x (- (min x0 x2) shadow-blur))
-         (shadow-offset-y (- (min y0 y2) shadow-blur)))
-
-
-    (set! shadow-layer (car (gimp-layer-new image
-                                            select-width
-                                            select-height
-                                            type
-                                            "Perspective Shadow"
-                                            shadow-opacity
-                                            NORMAL-MODE)))
-
-
-    (gimp-image-add-layer image shadow-layer -1)
-    (gimp-layer-set-offsets shadow-layer select-offset-x select-offset-y)
-    (gimp-drawable-fill shadow-layer TRANSPARENT-FILL)
-    (gimp-context-set-background shadow-color)
-    (gimp-edit-fill shadow-layer BACKGROUND-FILL)
-    (gimp-selection-none image)
-
-    (if (= allow-resize TRUE)
-        (let* ((new-image-width image-width)
-               (new-image-height image-height)
-               (image-offset-x 0)
-               (image-offset-y 0))
-
-          (if (< shadow-offset-x 0)
-              (begin
-                (set! image-offset-x (abs shadow-offset-x))
-                (set! new-image-width (+ new-image-width image-offset-x))
-                ; adjust to new coordinate system
-                (set! x0 (+ x0 image-offset-x))
-                (set! x1 (+ x1 image-offset-x))
-                (set! x2 (+ x2 image-offset-x))
-                (set! x3 (+ x3 image-offset-x))
-              ))
-
-          (if (< shadow-offset-y 0)
-              (begin
-                (set! image-offset-y (abs shadow-offset-y))
-                (set! new-image-height (+ new-image-height image-offset-y))
-                ; adjust to new coordinate system
-                (set! y0 (+ y0 image-offset-y))
-                (set! y1 (+ y1 image-offset-y))
-                (set! y2 (+ y2 image-offset-y))
-                (set! y3 (+ y3 image-offset-y))
-              ))
-
-          (if (> (+ shadow-width shadow-offset-x) new-image-width)
-              (set! new-image-width (+ shadow-width shadow-offset-x)))
-
-          (if (> (+ shadow-height shadow-offset-y) new-image-height)
-              (set! new-image-height (+ shadow-height shadow-offset-y)))
-          (gimp-image-resize image
-                             new-image-width
-                             new-image-height
-                             image-offset-x
-                             image-offset-y)))
-
-    (gimp-drawable-transform-perspective shadow-layer
-                      x0 y0
-                      x1 y1
-                      x2 y2
-                      x3 y3
-                      TRANSFORM-FORWARD
-                      interpolation
-                      TRUE 3 TRANSFORM-RESIZE-ADJUST)
-
-    (if (>= shadow-blur 1.0)
+    (gimp-context-push)
+    (gimp-context-set-defaults)
+
+    (if (> rel-distance 24) (set! rel-distance 999999))
+    (if (= rel-distance rel-length) (set! rel-distance (+ rel-distance 0.01)))
+
+    (gimp-image-undo-group-start image)
+
+    (gimp-layer-add-alpha drawable)
+    (if (= (car (gimp-selection-is-empty image)) TRUE)
+        (begin
+          (gimp-image-select-item image CHANNEL-OP-REPLACE drawable)
+          (set! from-selection FALSE))
         (begin
-          (gimp-layer-set-lock-alpha shadow-layer FALSE)
-          (gimp-layer-resize shadow-layer
-                             shadow-width
-                             shadow-height
-                             shadow-blur
-                             shadow-blur)
-          (plug-in-gauss-rle RUN-NONINTERACTIVE
-                             image
-                             shadow-layer
-                             shadow-blur
-                             TRUE
-                             TRUE))))
-
-  (if (= from-selection TRUE)
-      (begin
-        (gimp-selection-load active-selection)
-        (gimp-edit-clear shadow-layer)
-        (gimp-image-remove-channel image active-selection)))
-
-  (if (and
-       (= (car (gimp-layer-is-floating-sel drawable)) 0)
-       (= from-selection FALSE))
-      (gimp-image-raise-layer image drawable))
-
-  (gimp-image-set-active-layer image drawable)
-  (gimp-image-undo-group-end image)
-  (gimp-displays-flush)
-
-  (gimp-context-pop)
+          (set! from-selection TRUE)
+          (set! active-selection (car (gimp-selection-save image)))))
+
+    (let* ((selection-bounds (gimp-selection-bounds image))
+           (select-offset-x (cadr selection-bounds))
+           (select-offset-y (caddr selection-bounds))
+           (select-width (- (cadr (cddr selection-bounds)) select-offset-x))
+           (select-height (- (caddr (cddr selection-bounds)) select-offset-y))
+
+           (abs-length (* rel-length select-height))
+           (abs-distance (* rel-distance select-height))
+           (half-bottom-width (/ select-width 2))
+           (half-top-width (* half-bottom-width
+                            (/ (- rel-distance rel-length) rel-distance)))
+
+           (x0 (+ select-offset-x (+ (- half-bottom-width half-top-width)
+                                   (* (cos alpha) abs-length))))
+           (y0 (+ select-offset-y (- select-height
+                                   (* (sin alpha) abs-length))))
+           (x1 (+ x0 (* 2 half-top-width)))
+           (y1 y0)
+           (x2 select-offset-x)
+           (y2 (+ select-offset-y select-height))
+           (x3 (+ x2 select-width))
+           (y3 y2)
+
+           (shadow-width (+ (- (max x1 x3) (min x0 x2)) (* 2 shadow-blur)))
+           (shadow-height (+ (- (max y1 y3) (min y0 y2)) (* 2 shadow-blur)))
+           (shadow-offset-x (- (min x0 x2) shadow-blur))
+           (shadow-offset-y (- (min y0 y2) shadow-blur)))
+
+
+      (set! shadow-layer (car (gimp-layer-new image
+                                              select-width
+                                              select-height
+                                              type
+                                              "Perspective Shadow"
+                                              shadow-opacity
+                                              NORMAL-MODE)))
+
+
+      (gimp-image-insert-layer image shadow-layer 0 -1)
+      (gimp-layer-set-offsets shadow-layer select-offset-x select-offset-y)
+      (gimp-drawable-fill shadow-layer TRANSPARENT-FILL)
+      (gimp-context-set-background shadow-color)
+      (gimp-edit-fill shadow-layer BACKGROUND-FILL)
+      (gimp-selection-none image)
+
+      (if (= allow-resize TRUE)
+          (let* ((new-image-width image-width)
+                 (new-image-height image-height)
+                 (image-offset-x 0)
+                 (image-offset-y 0))
+
+            (if (< shadow-offset-x 0)
+                (begin
+                  (set! image-offset-x (abs shadow-offset-x))
+                  (set! new-image-width (+ new-image-width image-offset-x))
+                  ; adjust to new coordinate system
+                  (set! x0 (+ x0 image-offset-x))
+                  (set! x1 (+ x1 image-offset-x))
+                  (set! x2 (+ x2 image-offset-x))
+                  (set! x3 (+ x3 image-offset-x))
+                ))
+
+            (if (< shadow-offset-y 0)
+                (begin
+                  (set! image-offset-y (abs shadow-offset-y))
+                  (set! new-image-height (+ new-image-height image-offset-y))
+                  ; adjust to new coordinate system
+                  (set! y0 (+ y0 image-offset-y))
+                  (set! y1 (+ y1 image-offset-y))
+                  (set! y2 (+ y2 image-offset-y))
+                  (set! y3 (+ y3 image-offset-y))
+                ))
+
+            (if (> (+ shadow-width shadow-offset-x) new-image-width)
+                (set! new-image-width (+ shadow-width shadow-offset-x)))
+
+            (if (> (+ shadow-height shadow-offset-y) new-image-height)
+                (set! new-image-height (+ shadow-height shadow-offset-y)))
+            (gimp-image-resize image
+                               new-image-width
+                               new-image-height
+                               image-offset-x
+                               image-offset-y)))
+
+      (gimp-context-set-transform-direction TRANSFORM-FORWARD)
+      (gimp-context-set-interpolation interpolation)
+      (gimp-context-set-transform-recursion 3)
+      (gimp-context-set-transform-resize TRANSFORM-RESIZE-ADJUST)
+
+      (gimp-item-transform-perspective shadow-layer
+                        x0 y0
+                        x1 y1
+                        x2 y2
+                        x3 y3)
+
+      (if (>= shadow-blur 1.0)
+          (begin
+            (gimp-layer-set-lock-alpha shadow-layer FALSE)
+            (gimp-layer-resize shadow-layer
+                               shadow-width
+                               shadow-height
+                               shadow-blur
+                               shadow-blur)
+            (plug-in-gauss-rle RUN-NONINTERACTIVE
+                               image
+                               shadow-layer
+                               shadow-blur
+                               TRUE
+                               TRUE))))
+
+    (if (= from-selection TRUE)
+        (begin
+          (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
+          (gimp-edit-clear shadow-layer)
+          (gimp-image-remove-channel image active-selection)))
+
+    (if (and
+          (= (car (gimp-layer-is-floating-sel drawable)) 0)
+          (= from-selection FALSE))
+      (gimp-image-raise-item image drawable))
+
+    (gimp-image-set-active-layer image drawable)
+    (gimp-image-undo-group-end image)
+    (gimp-displays-flush)
+
+    (gimp-context-pop)
   )
 )
 
diff --git a/scripts/plug-in-compat.init b/scripts/plug-in-compat.init
new file mode 100644
index 0000000..dd68c2c
--- /dev/null
+++ b/scripts/plug-in-compat.init
@@ -0,0 +1,24 @@
+; The Scheme code in this file provides some compatibility with
+; scripts that were originally written for use with older versions of
+; GIMP.
+;
+; It provides PDB procedures that used to be provided by plug-ins that
+; were since then removed from the GIMP distribution. You should not
+; use these in newly written scripts as the functions defined here may
+; be removed at some later date.
+
+
+(define (plug-in-color-map run-mode img layer
+                          src-color-1 src-color-2 dest-color-1 dest-color-2
+                          map-mode)
+  (gimp-levels layer HISTOGRAM-RED
+              (car src-color-1) (car src-color-2) 1.0
+              (- 255 (car dest-color-1)) (- 255 (car dest-color-2)))
+  (gimp-levels layer  HISTOGRAM-GREEN
+              (cadr    src-color-1) (cadr src-color-2) 1.0
+              (- 255 (cadr dest-color-1)) (- 255 (cadr dest-color-2)))
+  (gimp-levels layer HISTOGRAM-BLUE
+              (caddr src-color-1) (caddr src-color-2) 1.0
+              (- 255 (caddr dest-color-1)) (- 255 (caddr dest-color-2)))
+  (gimp-levels layer HISTOGRAM-VALUE 0 255 1.0 255 0)
+)
diff --git a/scripts/predator.scm b/scripts/predator.scm
index ac0e893..f8e1fe4 100644
--- a/scripts/predator.scm
+++ b/scripts/predator.scm
@@ -9,9 +9,9 @@
 ;  the view the predator had in the movies. ie, kind of a thermogram
 ;  type of thing. Works best on colorful rgb images.
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -20,8 +20,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 (define (script-fu-predator image
@@ -35,23 +34,25 @@
         (type (car (gimp-drawable-type-with-alpha drawable)))
         (image-width (car (gimp-image-width image)))
         (image-height (car (gimp-image-height image)))
-        (active-selection)
-        (from-selection)
-        (selection-bounds)
-        (select-offset-x)
-        (select-offset-y)
-        (select-width)
-        (select-height)
-        (effect-layer)
-        (active-layer)
+        (active-selection 0)
+        (from-selection 0)
+        (selection-bounds 0)
+        (select-offset-x 0)
+        (select-offset-y 0)
+        (select-width 0)
+        (select-height 0)
+        (effect-layer 0)
+        (active-layer 0)
         )
 
+    (gimp-context-push)
+    (gimp-context-set-defaults)
     (gimp-image-undo-group-start image)
     (gimp-layer-add-alpha drawable)
 
     (if (= (car (gimp-selection-is-empty image)) TRUE)
         (begin
-          (gimp-selection-layer-alpha drawable)
+          (gimp-image-select-item image CHANNEL-OP-REPLACE drawable)
           (set! active-selection (car (gimp-selection-save image)))
           (set! from-selection FALSE)
         )
@@ -79,11 +80,11 @@
           )
 
           (gimp-layer-set-offsets effect-layer select-offset-x select-offset-y)
-          (gimp-image-add-layer image effect-layer -1)
+          (gimp-image-insert-layer image effect-layer 0 -1)
           (gimp-selection-none image)
           (gimp-edit-clear effect-layer)
 
-          (gimp-selection-load active-selection)
+          (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
           (gimp-edit-copy drawable)
           (let ((floating-sel (car (gimp-edit-paste effect-layer FALSE))))
             (gimp-floating-sel-anchor floating-sel)
@@ -102,7 +103,7 @@
     (plug-in-edge RUN-NONINTERACTIVE image active-layer edge-amount 1 0)
 
     ; clean up the selection copy
-    (gimp-selection-load active-selection)
+    (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
 
     (if (= keep-selection FALSE)
         (gimp-selection-none image)
@@ -112,6 +113,7 @@
     (gimp-image-remove-channel image active-selection)
     (gimp-image-undo-group-end image)
     (gimp-displays-flush)
+    (gimp-context-pop)
   )
 )
 
diff --git a/scripts/pupi-button.scm b/scripts/pupi-button.scm
index f44c127..f8cafb6 100644
--- a/scripts/pupi-button.scm
+++ b/scripts/pupi-button.scm
@@ -11,9 +11,9 @@
 ; The corresponding parameters have been replaced by an SF-FONT parameter.
 ; ************************************************************************
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -22,8 +22,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 (define (script-fu-round-button text
                                 size
@@ -83,11 +82,11 @@
                         height
                         ratio)
     (let* ((diameter (* ratio height)))
-      (gimp-ellipse-select img x y diameter height CHANNEL-OP-ADD FALSE 0 0)
-      (gimp-ellipse-select img (+ x (- width diameter)) y
-                           diameter height CHANNEL-OP-ADD FALSE 0 0)
-      (gimp-rect-select img (+ x (/ diameter 2)) y
-                        (- width diameter) height CHANNEL-OP-ADD FALSE 0)))
+      (gimp-image-select-ellipse img CHANNEL-OP-ADD x y diameter height)
+      (gimp-image-select-ellipse img CHANNEL-OP-ADD (+ x (- width diameter)) y
+                           diameter height)
+      (gimp-image-select-rectangle img CHANNEL-OP-ADD (+ x (/ diameter 2)) y
+                        (- width diameter) height)))
 
   (let* (
         (text-extents (gimp-text-get-extents-fontname text
@@ -115,12 +114,13 @@
         )
 
     (gimp-context-push)
-
+    (gimp-context-set-antialias FALSE)
+    (gimp-context-set-feather FALSE)
     (gimp-image-undo-disable img)
 
     ; Create bumpmap layer
 
-    (gimp-image-add-layer img bumpmap -1)
+    (gimp-image-insert-layer img bumpmap 0 -1)
     (gimp-selection-none img)
     (gimp-context-set-background '(0 0 0))
     (gimp-edit-fill bumpmap BACKGROUND-FILL)
@@ -135,7 +135,7 @@
 
     ; Create gradient layer
 
-    (gimp-image-add-layer img gradient -1)
+    (gimp-image-insert-layer img gradient 0 -1)
     (gimp-edit-clear gradient)
     (round-select img 0 0 width height ratio)
     (gimp-context-set-foreground ul-color)
@@ -209,4 +209,4 @@
 )
 
 (script-fu-menu-register "script-fu-round-button"
-                         "<Toolbox>/Xtns/Buttons")
+                         "<Image>/File/Create/Buttons")
diff --git a/scripts/rendermap.scm b/scripts/rendermap.scm
index 4c4306b..3cfbd21 100644
--- a/scripts/rendermap.scm
+++ b/scripts/rendermap.scm
@@ -1,9 +1,9 @@
 ; Chris Gutteridge (cjg ecs soton ac uk)
 ; At ECS Dept, University of Southampton, England.
 
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -12,8 +12,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 (define (script-fu-render-map inSize
@@ -25,8 +24,8 @@
         (theWidth inSize)
         (theHeight inSize)
         (theImage (car(gimp-image-new theWidth theHeight RGB)))
-        (theLayer)
-        (thinLayer)
+        (theLayer 0)
+        (thinLayer 0)
         )
 
   (gimp-context-push)
@@ -37,7 +36,7 @@
                                       RGBA-IMAGE
                                       "I've got more rubber ducks than you!"
                                       100 NORMAL-MODE)))
-  (gimp-image-add-layer theImage theLayer 0)
+  (gimp-image-insert-layer theImage theLayer 0 0)
   (plug-in-solid-noise RUN-NONINTERACTIVE
                       theImage theLayer 1 0 (rand 65536)
                        inGrain inGrain inGrain)
@@ -47,7 +46,7 @@
         (set! thinLayer (car (gimp-layer-new theImage theWidth theHeight
                                              RGBA-IMAGE "Camo Thin Layer"
                                              100 NORMAL-MODE)))
-        (gimp-image-add-layer theImage thinLayer 0)
+        (gimp-image-insert-layer theImage thinLayer 0 0)
 
         (let ((theBigGrain (min 15 (* 2 inGrain))))
           (plug-in-solid-noise RUN-NONINTERACTIVE
@@ -92,4 +91,4 @@
 )
 
 (script-fu-menu-register "script-fu-render-map"
-                         "<Toolbox>/Xtns/Patterns")
+                         "<Image>/File/Create/Patterns")
diff --git a/scripts/reverse-layers.scm b/scripts/reverse-layers.scm
index 4f9a90e..63a3102 100644
--- a/scripts/reverse-layers.scm
+++ b/scripts/reverse-layers.scm
@@ -1,8 +1,18 @@
-;; reverse-layers.scm: Reverse the order of layers in the current image.
-;; Copyright (C) 2006 by Akkana Peck.
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License.
+; reverse-layers.scm: Reverse the order of layers in the current image.
+; Copyright (C) 2006 by Akkana Peck.
+;
+; This program is free software: you can redistribute it and/or modify
+; it under the terms of the GNU General Public License as published by
+; the Free Software Foundation; either version 3 of the License, or
+; (at your option) any later version.
+;
+; This program is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of
+; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+; GNU General Public License for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 (define (script-fu-reverse-layers img drawable)
   (let* (
@@ -17,7 +27,7 @@
     (while (>= i 0)
            (let ((layer (aref layer-array i)))
              (if (= (car (gimp-layer-is-floating-sel layer)) FALSE)
-                 (gimp-image-lower-layer-to-bottom img layer))
+                 (gimp-image-lower-item-to-bottom img layer))
            )
 
            (set! i (- i 1))
diff --git a/scripts/ripply-anim.scm b/scripts/ripply-anim.scm
index 91aeab1..b2a1605 100644
--- a/scripts/ripply-anim.scm
+++ b/scripts/ripply-anim.scm
@@ -25,19 +25,19 @@
         (height (car (gimp-drawable-height drawable)))
         (ripple-image (car (gimp-image-new width height GRAY)))
         (ripple-layer (car (gimp-layer-new ripple-image width height GRAY-IMAGE "Ripple Texture" 100 
NORMAL-MODE)))
-        (rippletiled-ret)
-        (rippletiled-image)
-        (rippletiled-layer)
-        (remaining-frames)
-        (xpos)
-        (ypos)
-        (xoffset)
-        (yoffset)
-        (dup-image)
-        (layer-name)
-        (this-image)
-        (this-layer)
-        (dup-layer)
+        (rippletiled-ret 0)
+        (rippletiled-image 0)
+        (rippletiled-layer 0)
+        (remaining-frames 0)
+        (xpos 0)
+        (ypos 0)
+        (xoffset 0)
+        (yoffset 0)
+        (dup-image 0)
+        (layer-name 0)
+        (this-image 0)
+        (this-layer 0)
+        (dup-layer 0)
         )
 
     (gimp-context-push)
@@ -46,7 +46,7 @@
 
     (gimp-image-undo-disable ripple-image)
     (gimp-context-set-background '(127 127 127))
-    (gimp-image-add-layer ripple-image ripple-layer 0)
+    (gimp-image-insert-layer ripple-image ripple-layer 0 0)
     (gimp-edit-fill ripple-layer BACKGROUND-FILL)
     (plug-in-noisify RUN-NONINTERACTIVE ripple-image ripple-layer FALSE 1.0 1.0 1.0 0.0)
     ; tile noise
@@ -89,7 +89,7 @@
       (set! this-layer (car (gimp-layer-new out-imagestack
                                             width height RGB
                                             layer-name 100 NORMAL-MODE)))
-      (gimp-image-add-layer out-imagestack this-layer 0)
+      (gimp-image-insert-layer out-imagestack this-layer 0 0)
 
       (copy-layer-ripple out-imagestack this-layer img drawable)
 
diff --git a/scripts/round-corners.scm b/scripts/round-corners.scm
index c845ac8..d5549fb 100644
--- a/scripts/round-corners.scm
+++ b/scripts/round-corners.scm
@@ -1,9 +1,9 @@
 ; GIMP - The GNU Image Manipulation Program
 ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -12,8 +12,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;
 ;
 ; round-corners.scm   version 1.02   1999/12/21
@@ -59,6 +58,9 @@
                        img)))
          (pic-layer (car (gimp-image-get-active-drawable image))))
 
+  (gimp-context-push)
+  (gimp-context-set-defaults)
+
   (if (= work-on-copy TRUE)
       (gimp-image-undo-disable image)
       (gimp-image-undo-group-start image)
@@ -69,16 +71,16 @@
 
   ; round the edges
   (gimp-selection-none image)
-  (gimp-rect-select image 0 0 radius radius CHANNEL-OP-ADD 0 0)
-  (gimp-ellipse-select image 0 0 diam diam CHANNEL-OP-SUBTRACT TRUE 0 0)
-  (gimp-rect-select image (- width radius) 0 radius radius CHANNEL-OP-ADD 0 0)
-  (gimp-ellipse-select image (- width diam) 0 diam diam CHANNEL-OP-SUBTRACT TRUE 0 0)
-  (gimp-rect-select image 0 (- height radius) radius radius CHANNEL-OP-ADD 0 0)
-  (gimp-ellipse-select image 0 (- height diam) diam diam CHANNEL-OP-SUBTRACT TRUE 0 0)
-  (gimp-rect-select image (- width radius) (- height radius)
-                    radius radius CHANNEL-OP-ADD 0 0)
-  (gimp-ellipse-select image (- width diam) (- height diam)
-                       diam diam CHANNEL-OP-SUBTRACT TRUE 0 0)
+  (gimp-image-select-rectangle image CHANNEL-OP-ADD 0 0 radius radius)
+  (gimp-image-select-ellipse image CHANNEL-OP-SUBTRACT  0 0 diam diam)
+  (gimp-image-select-rectangle image CHANNEL-OP-ADD (- width radius) 0 radius radius)
+  (gimp-image-select-ellipse image CHANNEL-OP-SUBTRACT (- width diam) 0 diam diam)
+  (gimp-image-select-rectangle image CHANNEL-OP-ADD 0 (- height radius) radius radius)
+  (gimp-image-select-ellipse image CHANNEL-OP-SUBTRACT 0 (- height diam) diam diam)
+  (gimp-image-select-rectangle image CHANNEL-OP-ADD (- width radius) (- height radius)
+                    radius radius)
+  (gimp-image-select-ellipse image CHANNEL-OP-SUBTRACT (- width diam) (- height diam)
+                       diam diam)
   (gimp-edit-clear pic-layer)
   (gimp-selection-none image)
 
@@ -106,10 +108,10 @@
                                             100
                                             NORMAL-MODE))))
         (gimp-drawable-fill bg-layer BACKGROUND-FILL)
-        (gimp-image-add-layer image bg-layer -1)
-        (gimp-image-raise-layer image pic-layer)
+        (gimp-image-insert-layer image bg-layer 0 -1)
+        (gimp-image-raise-item image pic-layer)
         (if (= shadow-toggle TRUE)
-            (gimp-image-lower-layer image bg-layer))))
+            (gimp-image-lower-item image bg-layer))))
 
 ; clean up after the script
   (if (= work-on-copy TRUE)
@@ -119,6 +121,7 @@
 
   (if (= work-on-copy TRUE)
       (gimp-display-new image))
+  (gimp-context-pop)
   (gimp-displays-flush))
 )
 
diff --git a/scripts/script-fu-compat.init b/scripts/script-fu-compat.init
index 9b69f8a..33750e6 100644
--- a/scripts/script-fu-compat.init
+++ b/scripts/script-fu-compat.init
@@ -129,18 +129,13 @@
 ;may be useful enough to keep around
 
 (define (delq item lis)
-  (let ((l))
-    (if (null? lis)
-      (set! l '())
-      (begin
-        (set! l (car lis))
-        (set! lis (cdr lis))
-        (while (not (null? lis))
-          (if (not (= item (car lis)))
-            (set! l (append l (list (car lis))))
-          )
-          (set! lis (cdr lis))
+  (let ((l '()))
+    (unless (null? lis)
+      (while (pair? lis)
+        (if (<> item (car lis))
+          (set! l (append l (list (car lis))))
         )
+        (set! lis (cdr lis))
       )
     )
 
@@ -158,7 +153,7 @@
         (start 0)
         (end (string-length str))
         (i start)
-        (l)
+        (l '())
         )
 
     (if (= seplen 0)
@@ -187,8 +182,8 @@
   )
 )
 
-(define (substring-equal? str str2 start end)
-  (string=? str (substring str2 start end))
+(define (string-downcase str)
+  (list->string (map char-downcase (string->list str)))
 )
 
 (define (string-trim str)
@@ -224,6 +219,14 @@
   )
 )
 
+(define (string-upcase str)
+  (list->string (map char-upcase (string->list str)))
+)
+
+(define (substring-equal? str str2 start end)
+  (string=? str (substring str2 start end))
+)
+
 (define (unbreakupstr stringlist sep)
   (let ((str (car stringlist)))
 
@@ -276,7 +279,7 @@
     ((short)  (make-vector count 0))
     ((byte)   (make-vector count 0))
     ((double) (make-vector count 0.0))
-    ((string) (make-vector count ""))
+    ((string) (vector->list (make-vector count "")))
     (else type)
   )
 )
@@ -290,7 +293,7 @@
   (define (fread-get-chars count file)
     (let (
          (str "")
-         (c)
+         (c 0)
          )
 
       (while (> count 0)
@@ -330,8 +333,7 @@
 )
 
 (define (prog1 form1 . form2)
-  (let ((a))
-    (set! a form1)
+  (let ((a form1))
     (if (not (null? form2))
       form2
     )
diff --git a/scripts/script-fu-set-cmap.scm b/scripts/script-fu-set-cmap.scm
index 8fd9d0b..0f103f5 100644
--- a/scripts/script-fu-set-cmap.scm
+++ b/scripts/script-fu-set-cmap.scm
@@ -4,14 +4,14 @@
 ; Change the colourmap of an image to the colours in a specified palette.
 ; Included is script-fu-make-cmap-array (available for use in scripts) which
 ; returns an INT8ARRAY containing the colours from a specified palette.
-; This array can be used as the cmap argument for gimp-image-set-cmap.
+; This array can be used as the cmap argument for gimp-image-set-colormap.
 
 ; GIMP - The GNU Image Manipulation Program
 ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -20,14 +20,13 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 (define (script-fu-make-cmap-array palette)
   (let* (
         (num-colours (car (gimp-palette-get-info palette)))
         (cmap (cons-array (* num-colours 3) 'byte))
-        (colour)
+        (colour 0)
         (i 0)
         )
 
diff --git a/scripts/script-fu-util-setpt.scm b/scripts/script-fu-util-setpt.scm
index e7093c7..624bea8 100644
--- a/scripts/script-fu-util-setpt.scm
+++ b/scripts/script-fu-util-setpt.scm
@@ -1,9 +1,9 @@
 ; GIMP - The GNU Image Manipulation Program
 ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -12,8 +12,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 (define (script-fu-set-pt a index x y)
   (aset a (* index 2) x)
diff --git a/scripts/script-fu-util.scm b/scripts/script-fu-util.scm
index 44d08bd..546b1ed 100644
--- a/scripts/script-fu-util.scm
+++ b/scripts/script-fu-util.scm
@@ -1,9 +1,9 @@
 ; GIMP - The GNU Image Manipulation Program
 ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -12,8 +12,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 ; Resizes the image so as to include the selected layer.
 ; The resulting image has the selected layer size.
@@ -31,3 +30,17 @@
   )
 )
 
+; Add the specified layers to the image.
+; The layers will be added in the given order below the
+; active layer.
+;
+(define (script-fu-util-image-add-layers image . layers)
+  (while (not (null? layers))
+    (let ((layer (car layers)))
+      (set! layers (cdr layers))
+      (gimp-image-insert-layer image layer 0 -1)
+      (gimp-image-lower-item image layer)
+    )
+  )
+)
+
diff --git a/scripts/script-fu.init b/scripts/script-fu.init
index f90bd53..7a84b9f 100644
--- a/scripts/script-fu.init
+++ b/scripts/script-fu.init
@@ -1,4 +1,4 @@
-;    Initialization file for TinySCHEME 1.38
+;    Initialization file for TinySCHEME 1.40
 
 ; Per R5RS, up to four deep compositions should be defined
 (define (caar x) (car (car x)))
@@ -30,6 +30,18 @@
 (define (cdddar x) (cdr (cdr (cdr (car x)))))
 (define (cddddr x) (cdr (cdr (cdr (cdr x)))))
 
+;;;; Utility to ease macro creation
+(define (macro-expand form)
+     ((eval (get-closure-code (eval (car form)))) form))
+
+(define (macro-expand-all form)
+   (if (macro? form)
+      (macro-expand-all (macro-expand form))
+      form))
+
+(define *compile-hook* macro-expand-all)
+
+
 (macro (unless form)
      `(if (not ,(cadr form)) (begin ,@(cddr form))))
 
@@ -58,10 +70,21 @@
 (define (abs n) (if (>= n 0) n (- n)))
 (define (exact->inexact n) (* n 1.0))
 (define (<> n1 n2) (not (= n1 n2)))
+
+; min and max must return inexact if any arg is inexact; use (+ n 0.0)
 (define (max . lst)
-     (foldr (lambda (a b) (if (> a b) a b)) (car lst) (cdr lst)))
+  (foldr (lambda (a b)
+           (if (> a b)
+             (if (exact? b) a (+ a 0.0))
+             (if (exact? a) b (+ b 0.0))))
+         (car lst) (cdr lst)))
 (define (min . lst)
-     (foldr (lambda (a b) (if (< a b) a b)) (car lst) (cdr lst)))
+  (foldr (lambda (a b)
+           (if (< a b)
+             (if (exact? b) a (+ a 0.0))
+             (if (exact? a) b (+ b 0.0))))
+         (car lst) (cdr lst)))
+
 (define (succ x) (+ x 1))
 (define (pred x) (- x 1))
 (define gcd
@@ -69,7 +92,7 @@
     (if (null? a)
       0
       (let ((aa (abs (car a)))
-           (bb (abs (cadr a))))
+            (bb (abs (cadr a))))
          (if (= bb 0)
               aa
               (gcd bb (remainder aa bb)))))))
@@ -78,12 +101,11 @@
     (if (null? a)
       1
       (let ((aa (abs (car a)))
-           (bb (abs (cadr a))))
+            (bb (abs (cadr a))))
          (if (or (= aa 0) (= bb 0))
              0
              (abs (* (quotient aa (gcd aa bb)) bb)))))))
 
-(define call/cc call-with-current-continuation)
 
 (define (string . charlist)
      (list->string charlist))
@@ -115,12 +137,12 @@
 (define (string-copy str)
      (string-append str))
 
-(define (string->anyatom str pred . radix)
+(define (string->anyatom str pred)
      (let* ((a (string->atom str)))
        (if (pred a) a
-          (error "string->xxx: not a xxx" a))))
+         (error "string->xxx: not a xxx" a))))
 
-(define (string->number str . radix) (string->anyatom str number? radix))
+(define (string->number str) (string->anyatom str number?))
 
 (define (anyatom->string n pred)
   (if (pred n)
@@ -188,31 +210,31 @@
   (if (null? lists)
       (cons cars cdrs)
       (let ((car1 (caar lists))
-           (cdr1 (cdar lists)))
-       (unzip1-with-cdr-iterative
-        (cdr lists)
-        (append cars (list car1))
-        (append cdrs (list cdr1))))))
+            (cdr1 (cdar lists)))
+        (unzip1-with-cdr-iterative
+          (cdr lists)
+          (append cars (list car1))
+          (append cdrs (list cdr1))))))
 
 (define (map proc . lists)
   (if (null? lists)
       (apply proc)
       (if (null? (car lists))
-         '()
-         (let* ((unz (apply unzip1-with-cdr lists))
-                (cars (car unz))
-                (cdrs (cdr unz)))
-           (cons (apply proc cars) (apply map (cons proc cdrs)))))))
+        '()
+        (let* ((unz (apply unzip1-with-cdr lists))
+               (cars (car unz))
+               (cdrs (cdr unz)))
+          (cons (apply proc cars) (apply map (cons proc cdrs)))))))
 
 (define (for-each proc . lists)
   (if (null? lists)
       (apply proc)
       (if (null? (car lists))
-         #t
-         (let* ((unz (apply unzip1-with-cdr lists))
-                (cars (car unz))
-                (cdrs (cdr unz)))
-           (apply proc cars) (apply map (cons proc cdrs))))))
+        #t
+        (let* ((unz (apply unzip1-with-cdr lists))
+               (cars (car unz))
+               (cdrs (cdr unz)))
+          (apply proc cars) (apply map (cons proc cdrs))))))
 
 (define (list-tail x k)
     (if (zero? k)
@@ -314,6 +336,116 @@
                                          (foo level (cdr form)))))))))
    (foo 0 (car (cdr l)))))
 
+;;;;;Helper for the dynamic-wind definition.  By Tom Breton (Tehom)
+(define (shared-tail x y)
+   (let ((len-x (length x))
+         (len-y (length y)))
+      (define (shared-tail-helper x y)
+         (if
+            (eq? x y)
+            x
+            (shared-tail-helper (cdr x) (cdr y))))
+
+      (cond
+         ((> len-x len-y)
+            (shared-tail-helper
+               (list-tail x (- len-x len-y))
+               y))
+         ((< len-x len-y)
+            (shared-tail-helper
+               x
+               (list-tail y (- len-y len-x))))
+         (#t (shared-tail-helper x y)))))
+
+;;;;;Dynamic-wind by Tom Breton (Tehom)
+
+;;Guarded because we must only eval this once, because doing so
+;;redefines call/cc in terms of old call/cc
+(unless (defined? 'dynamic-wind)
+   (let
+      ;;These functions are defined in the context of a private list of
+      ;;pairs of before/after procs.
+      (  (*active-windings* '())
+         ;;We'll define some functions into the larger environment, so
+         ;;we need to know it.
+         (outer-env (current-environment)))
+
+      ;;Poor-man's structure operations
+      (define before-func car)
+      (define after-func  cdr)
+      (define make-winding cons)
+
+      ;;Manage active windings
+      (define (activate-winding! new)
+         ((before-func new))
+         (set! *active-windings* (cons new *active-windings*)))
+      (define (deactivate-top-winding!)
+         (let ((old-top (car *active-windings*)))
+            ;;Remove it from the list first so it's not active during its
+            ;;own exit.
+            (set! *active-windings* (cdr *active-windings*))
+            ((after-func old-top))))
+
+      (define (set-active-windings! new-ws)
+         (unless (eq? new-ws *active-windings*)
+            (let ((shared (shared-tail new-ws *active-windings*)))
+
+               ;;Define the looping functions.
+               ;;Exit the old list.  Do deeper ones last.  Don't do
+               ;;any shared ones.
+               (define (pop-many)
+                  (unless (eq? *active-windings* shared)
+                     (deactivate-top-winding!)
+                     (pop-many)))
+               ;;Enter the new list.  Do deeper ones first so that the
+               ;;deeper windings will already be active.  Don't do any
+               ;;shared ones.
+               (define (push-many new-ws)
+                  (unless (eq? new-ws shared)
+                     (push-many (cdr new-ws))
+                     (activate-winding! (car new-ws))))
+
+               ;;Do it.
+               (pop-many)
+               (push-many new-ws))))
+
+      ;;The definitions themselves.
+      (eval
+         `(define call-with-current-continuation
+             ;;It internally uses the built-in call/cc, so capture it.
+             ,(let ((old-c/cc call-with-current-continuation))
+                 (lambda (func)
+                    ;;Use old call/cc to get the continuation.
+                    (old-c/cc
+                       (lambda (continuation)
+                          ;;Call func with not the continuation itself
+                          ;;but a procedure that adjusts the active
+                          ;;windings to what they were when we made
+                          ;;this, and only then calls the
+                          ;;continuation.
+                          (func
+                             (let ((current-ws *active-windings*))
+                                (lambda (x)
+                                   (set-active-windings! current-ws)
+                                   (continuation x)))))))))
+         outer-env)
+      ;;We can't just say "define (dynamic-wind before thunk after)"
+      ;;because the lambda it's defined to lives in this environment,
+      ;;not in the global environment.
+      (eval
+         `(define dynamic-wind
+             ,(lambda (before thunk after)
+                 ;;Make a new winding
+                 (activate-winding! (make-winding before after))
+                 (let ((result (thunk)))
+                    ;;Get rid of the new winding.
+                    (deactivate-top-winding!)
+                    ;;The return value is that of thunk.
+                    result)))
+         outer-env)))
+
+(define call/cc call-with-current-continuation)
+
 
 ;;;;; atom? and equal? written by a.k
 
@@ -393,10 +525,6 @@
 
 (define (acons x y z) (cons (cons x y) z))
 
-;;;; Utility to ease macro creation
-(define (macro-expand form)
-     ((eval (get-closure-code (eval (car form)))) form))
-
 ;;;; Handy for imperative programs
 ;;;; Used as: (define-with-return (foo x y) .... (return z) ...)
 (macro (define-with-return form)
@@ -461,8 +589,8 @@
   (let* ((env (if (null? envl) (current-environment) (eval (car envl))))
          (xval (eval x env)))
     (if (closure? xval)
-       (make-closure (get-closure-code xval) env)
-       xval)))
+      (make-closure (get-closure-code xval) env)
+      xval)))
 
 ; Redefine this if you install another package infrastructure
 ; Also redefine 'package'
@@ -569,17 +697,18 @@
   (foldr (lambda (x y) (or (cond-eval x) (cond-eval y))) #f cond-list))
 
 (define (cond-eval condition)
-  (cond ((symbol? condition)
-        (if (member condition *features*) #t #f))
-       ((eq? condition #t) #t)
-       ((eq? condition #f) #f)
-       (else (case (car condition)
-               ((and) (cond-eval-and (cdr condition)))
-               ((or) (cond-eval-or (cdr condition)))
-               ((not) (if (not (null? (cddr condition)))
-                          (error "cond-expand : 'not' takes 1 argument")
-                          (not (cond-eval (cadr condition)))))
-               (else (error "cond-expand : unknown operator" (car condition)))))))
+  (cond
+    ((symbol? condition)
+       (if (member condition *features*) #t #f))
+    ((eq? condition #t) #t)
+    ((eq? condition #f) #f)
+    (else (case (car condition)
+            ((and) (cond-eval-and (cdr condition)))
+            ((or) (cond-eval-or (cdr condition)))
+            ((not) (if (not (null? (cddr condition)))
+                     (error "cond-expand : 'not' takes 1 argument")
+                     (not (cond-eval (cadr condition)))))
+            (else (error "cond-expand : unknown operator" (car condition)))))))
 
 (gc-verbose #f)
 
diff --git a/scripts/select-to-brush.scm b/scripts/select-to-brush.scm
index c0e0a41..ee95a9e 100644
--- a/scripts/select-to-brush.scm
+++ b/scripts/select-to-brush.scm
@@ -11,9 +11,9 @@
 ;       Parts of this script from Sven Neuman's Drop-Shadow and
 ;       Seth Burgess's mkbrush scripts.
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -22,8 +22,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 (define (script-fu-selection-to-brush image
@@ -38,22 +37,23 @@
         (select-offset-y  (caddr selection-bounds))
         (selection-width  (- (cadr (cddr selection-bounds))  select-offset-x))
         (selection-height (- (caddr (cddr selection-bounds)) select-offset-y))
-        (from-selection)
-        (active-selection)
-        (brush-draw-type)
-        (brush-image-type)
-        (brush-image)
-        (brush-draw)
-        (filename2)
+        (from-selection 0)
+        (active-selection 0)
+        (brush-draw-type 0)
+        (brush-image-type 0)
+        (brush-image 0)
+        (brush-draw 0)
+        (filename2 0)
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-image-undo-disable image)
 
     (if (= (car (gimp-selection-is-empty image)) TRUE)
         (begin
-          (gimp-selection-layer-alpha drawable)
+          (gimp-image-select-item image CHANNEL-OP-REPLACE drawable)
           (set! from-selection FALSE)
         )
         (begin
@@ -87,7 +87,7 @@
                                100
                                NORMAL-MODE)))
 
-    (gimp-image-add-layer brush-image brush-draw 0)
+    (gimp-image-insert-layer brush-image brush-draw 0 0)
 
     (gimp-selection-none brush-image)
 
@@ -112,7 +112,7 @@
 
     (if (= from-selection TRUE)
         (begin
-          (gimp-selection-load active-selection)
+          (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
           (gimp-image-remove-channel image active-selection)
         )
     )
diff --git a/scripts/select-to-image.scm b/scripts/select-to-image.scm
index 912b03e..f3860f6 100644
--- a/scripts/select-to-image.scm
+++ b/scripts/select-to-image.scm
@@ -8,9 +8,9 @@
 ; Takes the Current selection and saves it as a seperate image.
 ;
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -19,8 +19,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 (define (script-fu-selection-to-image image drawable)
@@ -32,19 +31,20 @@
         (select-offset-y (caddr selection-bounds))
         (selection-width (- (cadr (cddr selection-bounds)) select-offset-x))
         (selection-height (- (caddr (cddr selection-bounds)) select-offset-y))
-        (active-selection)
-        (from-selection)
-        (new-image)
-        (new-draw)
+        (active-selection 0)
+        (from-selection 0)
+        (new-image 0)
+        (new-draw 0)
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-image-undo-disable image)
 
     (if (= (car (gimp-selection-is-empty image)) TRUE)
         (begin
-          (gimp-selection-layer-alpha drawable)
+          (gimp-image-select-item image CHANNEL-OP-REPLACE drawable)
           (set! active-selection (car (gimp-selection-save image)))
           (set! from-selection FALSE)
         )
@@ -61,7 +61,7 @@
     (set! new-draw (car (gimp-layer-new new-image
                                         selection-width selection-height
                                         draw-type "Selection" 100 NORMAL-MODE)))
-    (gimp-image-add-layer new-image new-draw 0)
+    (gimp-image-insert-layer new-image new-draw 0 0)
     (gimp-drawable-fill new-draw BACKGROUND-FILL)
 
     (let ((floating-sel (car (gimp-edit-paste new-draw FALSE))))
diff --git a/scripts/select-to-pattern.scm b/scripts/select-to-pattern.scm
index 518dede..6d24fda 100644
--- a/scripts/select-to-pattern.scm
+++ b/scripts/select-to-pattern.scm
@@ -8,9 +8,9 @@
 ; Takes the current selection, saves it as a pattern and makes it the active
 ; pattern
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -19,23 +19,22 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 (define (script-fu-selection-to-pattern image drawable desc filename)
 
   (let* (
-        (selection-width)
-        (selection-height)
-        (selection-bounds)
-        (select-offset-x)
-        (select-offset-y)
-        (pattern-draw-type)
-        (pattern-image-type)
-        (pattern-image)
-        (pattern-draw)
-        (filename2)
+        (selection-width 0)
+        (selection-height 0)
+        (selection-bounds 0)
+        (select-offset-x 0)
+        (select-offset-y 0)
+        (pattern-draw-type 0)
+        (pattern-image-type 0)
+        (pattern-image 0)
+        (pattern-draw 0)
+        (filename2 0)
         )
 
   (if (= (car (gimp-selection-is-empty image)) TRUE)
@@ -68,7 +67,7 @@
 
   (gimp-drawable-fill pattern-draw TRANSPARENT-FILL)
 
-  (gimp-image-add-layer pattern-image pattern-draw 0)
+  (gimp-image-insert-layer pattern-image pattern-draw 0 0)
 
   (gimp-edit-copy drawable)
 
diff --git a/scripts/selection-round.scm b/scripts/selection-round.scm
index 63dfc51..bc0d030 100644
--- a/scripts/selection-round.scm
+++ b/scripts/selection-round.scm
@@ -1,37 +1,36 @@
-;; selection-rounded-rectangle.scm -*-scheme-*-
-
-;; GIMP - The GNU Image Manipulation Program
-;; Copyright (C) 1995 Spencer Kimball and Peter Mattis
-;;
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2 of the License, or
-;; (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; if not, write to the Free Software
-;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;; CHANGE-LOG:
-;; 1.00 - initial release
-;; 1.01 - some code cleanup, no real changes
-;; 1.02 - made script undoable
-
-;; 2.00 - ALAN's Branch.  changed name, menu, location, and description
-;; 2.01 - fixed to work if there was no current selection.
-;; 2.02 - changed scale to percentages, usability tweaking.
-;; 2.10 - added concave round edges, updated description.
-;; 2.11 - tweeked description, changed comments, relinquished any rights.
-
-;; Copyright (C) 1997, 1998, Sven Neumann
-;; Copyright (C) 2004, Alan Horkan.
-;; Alan Horkan relinquishes all rights to his changes,
-;; full ownership of this script belongs to Sven Neumann.
+; selection-rounded-rectangle.scm -*-scheme-*-
+
+; GIMP - The GNU Image Manipulation Program
+; Copyright (C) 1995 Spencer Kimball and Peter Mattis
+;
+; This program is free software: you can redistribute it and/or modify
+; it under the terms of the GNU General Public License as published by
+; the Free Software Foundation; either version 3 of the License, or
+; (at your option) any later version.
+;
+; This program is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of
+; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+; GNU General Public License for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+; CHANGE-LOG:
+; 1.00 - initial release
+; 1.01 - some code cleanup, no real changes
+; 1.02 - made script undoable
+
+; 2.00 - ALAN's Branch.  changed name, menu, location, and description
+; 2.01 - fixed to work if there was no current selection.
+; 2.02 - changed scale to percentages, usability tweaking.
+; 2.10 - added concave round edges, updated description.
+; 2.11 - tweeked description, changed comments, relinquished any rights.
+
+; Copyright (C) 1997, 1998, Sven Neumann
+; Copyright (C) 2004, Alan Horkan.
+; Alan Horkan relinquishes all rights to his changes,
+; full ownership of this script belongs to Sven Neumann.
 
 (define (script-fu-selection-rounded-rectangle image drawable radius concave)
   (gimp-image-undo-group-start image)
@@ -53,11 +52,13 @@
         (ellipse-radius 0)
         )
 
+    (gimp-context-push)
+    (gimp-context-set-defaults)
+
     ;; select to the full bounds of the selection,
     ;; fills in irregular shapes or holes.
-    (gimp-rect-select image
-              select-x1 select-y1 select-width select-height
-              CHANNEL-OP-ADD FALSE 0)
+    (gimp-image-select-rectangle image CHANNEL-OP-ADD
+              select-x1 select-y1 select-width select-height)
 
     (if (> select-width select-height)
       (set! cut-radius (trunc (+ 1 (* radius (/ select-height 2)))))
@@ -65,90 +66,72 @@
     )
     (set! ellipse-radius (* cut-radius 2))
 
+    (gimp-context-set-antialias TRUE)
     ;; cut away rounded (concave) corners
     ; top right
-    (gimp-ellipse-select image
-             (- select-x1 cut-radius)
-             (- select-y1 cut-radius)
-             (* cut-radius 2)
-             (* cut-radius 2)
-             CHANNEL-OP-SUBTRACT
-             TRUE
-             FALSE 0)
+    (gimp-image-select-ellipse image CHANNEL-OP-SUBTRACT
+                               (- select-x1 cut-radius)
+                               (- select-y1 cut-radius)
+                               (* cut-radius 2)
+                               (* cut-radius 2))
     ; lower left
-    (gimp-ellipse-select image
-             (- select-x1 cut-radius)
-             (- select-y2 cut-radius)
-             (* cut-radius 2)
-             (* cut-radius 2)
-             CHANNEL-OP-SUBTRACT
-             TRUE
-             FALSE 0)
+    (gimp-image-select-ellipse image CHANNEL-OP-SUBTRACT
+                               (- select-x1 cut-radius)
+                               (- select-y2 cut-radius)
+                               (* cut-radius 2)
+                               (* cut-radius 2))
     ; top right
-    (gimp-ellipse-select image
-             (- select-x2 cut-radius)
-             (- select-y1 cut-radius)
-             (* cut-radius 2)
-             (* cut-radius 2)
-             CHANNEL-OP-SUBTRACT
-             TRUE
-             FALSE 0)
+    (gimp-image-select-ellipse image CHANNEL-OP-SUBTRACT
+                               (- select-x2 cut-radius)
+                               (- select-y1 cut-radius)
+                               (* cut-radius 2)
+                               (* cut-radius 2))
     ; bottom left
-    (gimp-ellipse-select image
-             (- select-x2 cut-radius)
-             (- select-y2 cut-radius)
-             (* cut-radius 2)
-             (* cut-radius 2)
-             CHANNEL-OP-SUBTRACT
-             TRUE
-             FALSE 0)
+    (gimp-image-select-ellipse image CHANNEL-OP-SUBTRACT
+                               (- select-x2 cut-radius)
+                               (- select-y2 cut-radius)
+                               (* cut-radius 2)
+                               (* cut-radius 2))
 
     ;; add in rounded (convex) corners
     (if (= concave FALSE)
       (begin
-        (gimp-ellipse-select image
-                     select-x1
-                     select-y1
-                     ellipse-radius
-                     ellipse-radius
-                     CHANNEL-OP-ADD
-                     TRUE
-                     FALSE 0)
-        (gimp-ellipse-select image
-                     select-x1
-                     (- select-y2 ellipse-radius)
-                     ellipse-radius
-                     ellipse-radius
-                     CHANNEL-OP-ADD
-                     TRUE
-                     FALSE 0)
-        (gimp-ellipse-select image
-                     (- select-x2 ellipse-radius)
-                     select-y1
-                     ellipse-radius
-                     ellipse-radius
-                     CHANNEL-OP-ADD
-                     TRUE
-                     FALSE 0)
-        (gimp-ellipse-select image
-                     (- select-x2 ellipse-radius)
-                     (- select-y2 ellipse-radius)
-                     ellipse-radius
-                     ellipse-radius
-                     CHANNEL-OP-ADD
-                     TRUE
-                     FALSE 0)
+        (gimp-image-select-ellipse image
+                                   CHANNEL-OP-ADD
+                                   select-x1
+                                   select-y1
+                                   ellipse-radius
+                                   ellipse-radius)
+        (gimp-image-select-ellipse image
+                                   CHANNEL-OP-ADD
+                                   select-x1
+                                   (- select-y2 ellipse-radius)
+                                   ellipse-radius
+                                   ellipse-radius)
+        (gimp-image-select-ellipse image
+                                   CHANNEL-OP-ADD
+                                   (- select-x2 ellipse-radius)
+                                   select-y1
+                                   ellipse-radius
+                                   ellipse-radius)
+        (gimp-image-select-ellipse image
+                                   CHANNEL-OP-ADD
+                                   (- select-x2 ellipse-radius)
+                                   (- select-y2 ellipse-radius)
+                                   ellipse-radius
+                                   ellipse-radius)
       )
     )
 
     (gimp-image-undo-group-end image)
     (gimp-displays-flush)
+    (gimp-context-pop)
   )
 )
 
 
 (define (script-fu-selection-round image drawable radius)
-  (script-fu-selection-rounded-rectangle image drawable (* radius 100))
+  (script-fu-selection-rounded-rectangle image drawable (* radius 100) FALSE)
 )
 
 
@@ -167,7 +150,7 @@
 
 (script-fu-register "script-fu-selection-round"
   ""
-  "Round the corners of the current selection (deprecated, use Rounded Rectangle)"
+  "This procedure is deprecated! Use 'script-fu-selection-rounded-rectangle' instead."
   "Sven Neumann"              ; authors
   "Sven Neumann"              ; copyright
   "1998/02/06"
diff --git a/scripts/slide.scm b/scripts/slide.scm
index 48c918f..18c4036 100644
--- a/scripts/slide.scm
+++ b/scripts/slide.scm
@@ -1,9 +1,9 @@
 ; GIMP - The GNU Image Manipulation Program
 ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -12,8 +12,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;
 ;
 ; slide.scm   version 0.41   2004/03/28
@@ -97,6 +96,7 @@
         )
 
   (gimp-context-push)
+  (gimp-context-set-feather FALSE)
 
   (gimp-image-undo-disable image)
 
@@ -120,12 +120,12 @@
 
 ; add the background layer
   (gimp-drawable-fill bg-layer BACKGROUND-FILL)
-  (gimp-image-add-layer image bg-layer -1)
+  (gimp-image-insert-layer image bg-layer 0 -1)
 
 ; add the film layer
   (gimp-context-set-background '(0 0 0))
   (gimp-drawable-fill film-layer BACKGROUND-FILL)
-  (gimp-image-add-layer image film-layer -1)
+  (gimp-image-insert-layer image film-layer 0 -1)
 
 ; add the text
   (gimp-context-set-foreground font-color)
@@ -186,22 +186,18 @@
 
     (gimp-selection-none image)
     (while (< hole 8)
-           (gimp-rect-select image
-                             (* hole-space hole)
-                             top-y
-                             hole-width
-                             hole-height
-                             CHANNEL-OP-ADD
-                             FALSE
-                             0)
-           (gimp-rect-select image
-                             (* hole-space hole)
-                             bottom-y
-                             hole-width
-                             hole-height
-                             CHANNEL-OP-ADD
-                             FALSE
-                             0)
+           (gimp-image-select-rectangle image
+                                        CHANNEL-OP-ADD
+                                        (* hole-space hole)
+                                        top-y
+                                        hole-width
+                                        hole-height)
+           (gimp-image-select-rectangle image
+                                        CHANNEL-OP-ADD
+                                        (* hole-space hole)
+                                        bottom-y
+                                        hole-width
+                                        hole-height)
            (set! hole (+ hole 1))
     )
 
@@ -215,8 +211,8 @@
   )
 
 ; reorder the layers
-  (gimp-image-raise-layer image pic-layer)
-  (gimp-image-raise-layer image pic-layer)
+  (gimp-image-raise-item image pic-layer)
+  (gimp-image-raise-item image pic-layer)
 
 ; eventually rotate the whole thing back
   (if (< ratio 1)
diff --git a/scripts/sota-chrome-logo.scm b/scripts/sota-chrome-logo.scm
index 91f52b6..5cd760b 100644
--- a/scripts/sota-chrome-logo.scm
+++ b/scripts/sota-chrome-logo.scm
@@ -106,25 +106,26 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-image-undo-disable img)
     (gimp-image-resize img width height 0 0)
-    (gimp-image-add-layer img shadow 0)
-    (gimp-image-add-layer img layer3 0)
-    (gimp-image-add-layer img layer2 0)
+    (gimp-image-insert-layer img shadow 0 0)
+    (gimp-image-insert-layer img layer3 0 0)
+    (gimp-image-insert-layer img layer2 0 0)
     (gimp-context-set-background '(255 255 255))
     (gimp-selection-none img)
     (gimp-edit-fill layer2 BACKGROUND-FILL)
     (gimp-edit-fill layer3 BACKGROUND-FILL)
     (gimp-edit-clear shadow)
-    (gimp-drawable-set-visible text-layer FALSE)
-    (gimp-drawable-set-visible shadow FALSE)
+    (gimp-item-set-visible text-layer FALSE)
+    (gimp-item-set-visible shadow FALSE)
 
-    (gimp-rect-select img (/ b-size 2) (/ b-size 2) (- width b-size) (- height b-size) CHANNEL-OP-REPLACE 0 
0)
-    (gimp-rect-select img b-size b-size (- width (* b-size 2)) (- height (* b-size 2)) CHANNEL-OP-SUBTRACT 0 
0)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE (/ b-size 2) (/ b-size 2) (- width b-size) (- height 
b-size))
+    (gimp-image-select-rectangle img CHANNEL-OP-SUBTRACT b-size b-size (- width (* b-size 2)) (- height (* 
b-size 2)))
     (gimp-edit-fill text-layer BACKGROUND-FILL)
 
-    (gimp-selection-layer-alpha text-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
     (gimp-context-set-background '(0 0 0))
     (gimp-selection-translate img offx1 offy1)
     (gimp-selection-feather img feather)
@@ -132,30 +133,30 @@
     (gimp-selection-translate img (* 2 offx2) (* 2 offy2))
     (gimp-edit-fill layer3 BACKGROUND-FILL)
     (gimp-selection-none img)
-    (gimp-drawable-set-visible  layer2 TRUE)
-    (gimp-drawable-set-visible  layer3 TRUE)
+    (gimp-item-set-visible  layer2 TRUE)
+    (gimp-item-set-visible  layer3 TRUE)
     (set! layer2 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
     (gimp-invert layer2)
 
-    (gimp-image-add-layer img layer1 0)
+    (gimp-image-insert-layer img layer1 0 0)
     (copy-layer-sota img layer1 banding-img banding-layer)
     (gimp-image-delete banding-img)
     (gimp-layer-scale layer1 width height FALSE)
     (plug-in-gauss-iir RUN-NONINTERACTIVE img layer1 10 TRUE TRUE)
     (gimp-layer-set-opacity layer1 50)
-    (gimp-drawable-set-visible layer1 TRUE)
-    (gimp-drawable-set-visible layer2 TRUE)
+    (gimp-item-set-visible layer1 TRUE)
+    (gimp-item-set-visible layer2 TRUE)
     (set! layer1 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
     (gimp-curves-spline layer1 0 18 (spline1))
 
     (set! layer-mask (car (gimp-layer-create-mask layer1 ADD-BLACK-MASK)))
     (gimp-layer-add-mask layer1 layer-mask)
-    (gimp-selection-layer-alpha text-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
     (gimp-context-set-background '(255 255 255))
     (gimp-edit-fill layer-mask BACKGROUND-FILL)
 
     (set! layer2 (car (gimp-layer-copy layer1 TRUE)))
-    (gimp-image-add-layer img layer2 0)
+    (gimp-image-insert-layer img layer2 0 0)
     (gimp-context-set-brush (brush brush-size))
     (gimp-context-set-foreground '(255 255 255))
     (gimp-edit-stroke layer-mask)
@@ -181,12 +182,12 @@
     (gimp-color-balance layer2 2 TRUE (highlights (rval cc)) (highlights (gval cc)) (highlights (bval cc)))
     (gimp-hue-saturation layer2 0 0 chrome-lightness chrome-saturation)
 
-    (gimp-drawable-set-visible shadow TRUE)
-    (gimp-drawable-set-visible text-layer TRUE)
+    (gimp-item-set-visible shadow TRUE)
+    (gimp-item-set-visible text-layer TRUE)
 
-    (gimp-drawable-set-name text-layer "Background")
-    (gimp-drawable-set-name layer2 "Chrome")
-    (gimp-drawable-set-name layer1 "Highlight")
+    (gimp-item-set-name text-layer "Background")
+    (gimp-item-set-name layer2 "Chrome")
+    (gimp-item-set-name layer1 "Highlight")
 
     (gimp-layer-translate shadow (/ b-size -4) (/ b-size -4))
     (gimp-layer-translate layer2 (/ b-size -4) (/ b-size -4))
@@ -220,4 +221,4 @@
 )
 
 (script-fu-menu-register "script-fu-sota-chrome-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/speed-text.scm b/scripts/speed-text.scm
index ae6f263..b95504b 100644
--- a/scripts/speed-text.scm
+++ b/scripts/speed-text.scm
@@ -4,9 +4,9 @@
 ;
 ; Based on alien glow code from Adrian Likins
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -15,8 +15,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 (define (script-fu-speed-text string font font-size density text-color bg-color)
@@ -31,15 +30,16 @@
         (saved-select 0)
         (cell-size (/ font-size 8))
         (grey (/ (* density 255) 100))
-        (saved-sel)
-        (text-mask)
+        (saved-sel 0)
+        (text-mask 0)
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-image-undo-disable img)
-    (gimp-image-add-layer img bg-layer 1)
-    (gimp-image-add-layer img text-layer -1)
+    (gimp-image-insert-layer img bg-layer 0 1)
+    (gimp-image-insert-layer img text-layer 0 -1)
 
     (gimp-context-set-background bg-color)
     (gimp-edit-clear bg-layer)
@@ -48,7 +48,7 @@
     (gimp-floating-sel-anchor (car (gimp-text-fontname img text-layer 10 10 string 0 TRUE font-size PIXELS 
font)))
 
     ; save the selection for later
-    (gimp-selection-layer-alpha text-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
     (set! saved-sel (car (gimp-selection-save img)))
 
     ; add layer mask
@@ -63,7 +63,7 @@
 
     ; feather the mask
     (gimp-layer-set-edit-mask text-layer TRUE)
-    (gimp-selection-load saved-sel)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE saved-sel)
     (gimp-selection-feather img 10)
     (gimp-context-set-background (list grey grey grey))
     (gimp-edit-fill text-mask BACKGROUND-FILL)
@@ -98,4 +98,4 @@
 )
 
 (script-fu-menu-register "script-fu-speed-text"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/spinning-globe.scm b/scripts/spinning-globe.scm
index 4adc838..dff08a6 100644
--- a/scripts/spinning-globe.scm
+++ b/scripts/spinning-globe.scm
@@ -4,9 +4,9 @@
 ;
 ; Chris Gutteridge (cjg ecs soton ac uk)
 ; At ECS Dept, University of Southampton, England.
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -15,8 +15,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 ; Define the function:
@@ -36,7 +35,7 @@
         (n 0)
         (ang (* (/ 360 inFrames)
                 (if (= inFromLeft TRUE) 1 -1) ))
-        (theFrame)
+        (theFrame 0)
         )
 
   (gimp-layer-add-alpha theLayer)
@@ -44,8 +43,8 @@
   (while (> inFrames n)
     (set! n (+ n 1))
     (set! theFrame (car (gimp-layer-copy theLayer FALSE)))
-    (gimp-image-add-layer theImage theFrame 0)
-    (gimp-drawable-set-name theFrame
+    (gimp-image-insert-layer theImage theFrame 0 0)
+    (gimp-item-set-name theFrame
                          (string-append "Anim Frame: "
                                         (number->string (- inFrames n) 10)
                                         " (replace)"))
diff --git a/scripts/spyrogimp.scm b/scripts/spyrogimp.scm
index f18d311..445b498 100644
--- a/scripts/spyrogimp.scm
+++ b/scripts/spyrogimp.scm
@@ -1,25 +1,22 @@
-;; spyrogimp.scm -*-scheme-*-
-;; Draws Spirographs, Epitrochoids and Lissajous Curves.
-;; More info at http://www.wisdom.weizmann.ac.il/~elad/spyrogimp/
-;; Version 1.2
-;;
-;; Copyright (C) 2003 by Elad Shahar <elad wisdom weizmann ac il>
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; if not, write to the Free Software
-;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; spyrogimp.scm -*-scheme-*-
+; Draws Spirographs, Epitrochoids and Lissajous Curves.
+; More info at http://www.wisdom.weizmann.ac.il/~elad/spyrogimp/
+; Version 1.2
+;
+; Copyright (C) 2003 by Elad Shahar <elad wisdom weizmann ac il>
+;
+; This program is free software: you can redistribute it and/or modify
+; it under the terms of the GNU General Public License as published by
+; the Free Software Foundation; either version 3 of the License, or
+; (at your option) any later version.
+;
+; This program is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of
+; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+; GNU General Public License for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 ; This routine is invoked by a dialog.
diff --git a/scripts/starscape-logo.scm b/scripts/starscape-logo.scm
index 27ff7a6..1652153 100644
--- a/scripts/starscape-logo.scm
+++ b/scripts/starscape-logo.scm
@@ -72,13 +72,12 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-selection-none img)
     (script-fu-util-image-resize-from-layer img logo-layer)
-    (gimp-image-add-layer img bg-layer 1)
-    (gimp-image-add-layer img glow-layer 1)
-    (gimp-image-add-layer img shadow-layer 1)
-    (gimp-image-add-channel img bump-channel 0)
+    (script-fu-util-image-add-layers img shadow-layer glow-layer bg-layer)
+    (gimp-image-insert-channel img bump-channel 0 0)
     (gimp-layer-set-lock-alpha logo-layer TRUE)
 
     (gimp-context-set-background '(0 0 0))
@@ -86,14 +85,14 @@
     (gimp-edit-clear shadow-layer)
     (gimp-edit-clear glow-layer)
 
-    (gimp-selection-layer-alpha logo-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
     (gimp-selection-grow img grow)
     (gimp-selection-feather img feather)
     (gimp-context-set-background glow-color)
     (gimp-selection-feather img feather)
     (gimp-edit-fill glow-layer BACKGROUND-FILL)
 
-    (gimp-selection-layer-alpha logo-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
     (gimp-selection-feather img shadow-feather)
     (gimp-context-set-background '(0 0 0))
     (gimp-selection-translate img offx offy)
@@ -122,32 +121,6 @@
   )
 )
 
-(define (script-fu-starscape-logo-alpha img logo-layer size glow-color)
-  (begin
-    (gimp-image-undo-group-start img)
-    (apply-starscape-logo-effect img logo-layer size glow-color)
-    (gimp-image-undo-group-end img)
-    (gimp-displays-flush)
-  )
-)
-
-(script-fu-register "script-fu-starscape-logo-alpha"
-  _"Sta_rscape..."
-  _"Fill the selected region (or alpha) with a rock-like texture, a nova glow, and shadow"
-  "Spencer Kimball"
-  "Spencer Kimball"
-  "1997"
-  "RGBA"
-  SF-IMAGE       "Image"                    0
-  SF-DRAWABLE    "Drawable"                 0
-  SF-ADJUSTMENT _"Effect size (pixels * 4)" '(150 1 1000 1 10 0 1)
-  SF-COLOR      _"Glow color"               '(28 65 188)
-)
-
-(script-fu-menu-register "script-fu-starscape-logo-alpha"
-                         "<Image>/Filters/Alpha to Logo")
-
-
 (define (script-fu-starscape-logo text size fontname glow-color)
   (let* (
         (img (car (gimp-image-new 256 256 RGB)))
@@ -176,4 +149,4 @@
 )
 
 (script-fu-menu-register "script-fu-starscape-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/swirltile.scm b/scripts/swirltile.scm
index df78e4c..d3475f3 100644
--- a/scripts/swirltile.scm
+++ b/scripts/swirltile.scm
@@ -21,7 +21,7 @@
 
     (gimp-image-undo-disable img)
 
-    (gimp-image-add-layer img layer-one 0)
+    (gimp-image-insert-layer img layer-one 0 0)
     (gimp-context-set-background bg-color)
     (gimp-edit-fill layer-one BACKGROUND-FILL)
     (plug-in-noisify RUN-NONINTERACTIVE img layer-one FALSE noise-level noise-level noise-level 1.0)
@@ -54,7 +54,7 @@
   "Adrian Likins"
   "1997"
   ""
-  SF-ADJUSTMENT _"Depth"           '(10 0 64 1 1 0 0)
+  SF-ADJUSTMENT _"Depth"           '(10 1 64 1 1 0 0)
   SF-ADJUSTMENT _"Azimuth"          '(135 0 360 1 10 0 0)
   SF-ADJUSTMENT _"Elevation"        '(45 0 90 1 10 0 0)
   SF-ADJUSTMENT _"Blur radius"      '(3 0 128 1 10 0 0)
@@ -66,4 +66,4 @@
 )
 
 (script-fu-menu-register "script-fu-swirl-tile"
-                         "<Toolbox>/Xtns/Patterns")
+                         "<Image>/File/Create/Patterns")
diff --git a/scripts/swirly-pattern.scm b/scripts/swirly-pattern.scm
index d5000e2..2ee0550 100644
--- a/scripts/swirly-pattern.scm
+++ b/scripts/swirly-pattern.scm
@@ -5,9 +5,9 @@
 ; Copyright (C) 1997 Federico Mena Quintero
 ; federico nuclecu unam mx
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -16,8 +16,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 (define (script-fu-swirly-pattern qsize angle times)
@@ -35,9 +34,10 @@
                                         100 NORMAL-MODE))))
 
     (gimp-context-push)
+    (gimp-context-set-feather FALSE)
 
     (gimp-image-undo-disable img)
-    (gimp-image-add-layer img drawable 0)
+    (gimp-image-insert-layer img drawable 0 0)
 
     ; Render checkerboard
 
@@ -48,23 +48,23 @@
 
     ; Whirl upper left
 
-    (gimp-rect-select img 0 0 hsize hsize CHANNEL-OP-REPLACE 0 0)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 0 hsize hsize)
     (whirl-it img drawable angle times)
     (gimp-invert drawable)
 
     ; Whirl upper right
 
-    (gimp-rect-select img hsize 0 hsize hsize CHANNEL-OP-REPLACE 0 0)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE hsize 0 hsize hsize)
     (whirl-it img drawable (- angle) times)
 
     ; Whirl lower left
 
-    (gimp-rect-select img 0 hsize hsize hsize CHANNEL-OP-REPLACE 0 0)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 hsize hsize hsize)
     (whirl-it img drawable (- angle) times)
 
     ; Whirl lower right
 
-    (gimp-rect-select img hsize hsize hsize hsize CHANNEL-OP-REPLACE 0 0)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE hsize hsize hsize hsize)
     (whirl-it img drawable angle times)
     (gimp-invert drawable)
 
@@ -75,7 +75,7 @@
     (gimp-display-new img)
 
     (gimp-context-pop)
-  )
+ )
 )
 
 (script-fu-register "script-fu-swirly-pattern"
@@ -91,4 +91,4 @@
 )
 
 (script-fu-menu-register "script-fu-swirly-pattern"
-                         "<Toolbox>/Xtns/Patterns")
+                         "<Image>/File/Create/Patterns")
diff --git a/scripts/t-o-p-logo.scm b/scripts/t-o-p-logo.scm
index 8f413c6..058b028 100644
--- a/scripts/t-o-p-logo.scm
+++ b/scripts/t-o-p-logo.scm
@@ -23,17 +23,16 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (script-fu-util-image-resize-from-layer img logo-layer)
-    (gimp-image-add-layer img sparkle-layer 2)
-    (gimp-image-add-layer img shadow-layer 3)
-    (gimp-image-add-layer img bg-layer 4)
+    (script-fu-util-image-add-layers img sparkle-layer shadow-layer bg-layer)
     (gimp-selection-none img)
     (gimp-edit-clear shadow-layer)
     (gimp-edit-clear sparkle-layer)
     (gimp-context-set-background base-color)
     (gimp-edit-fill sparkle-layer BACKGROUND-FILL)
-    (gimp-selection-layer-alpha logo-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
     (set! selection (car (gimp-selection-save img)))
     (gimp-selection-grow img edge-size)
     (plug-in-noisify RUN-NONINTERACTIVE img sparkle-layer FALSE
@@ -42,22 +41,22 @@
     (plug-in-noisify RUN-NONINTERACTIVE img sparkle-layer FALSE hit-rate hit-rate hit-rate 0.0)
     (gimp-selection-none img)
     (plug-in-sparkle RUN-NONINTERACTIVE img sparkle-layer 0.03 0.49 width 6 15 1.0 0.0 0.0 0.0 FALSE FALSE 
FALSE 0)
-    (gimp-selection-load selection)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
     (gimp-selection-shrink img edge-size)
     (gimp-levels sparkle-layer 0 0 255 1.2 0 255)
-    (gimp-selection-load selection)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
     (gimp-selection-border img edge-size)
     (gimp-levels sparkle-layer 0 0 255 0.5 0 255)
-    (gimp-selection-load selection)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
     (gimp-selection-grow img (/ edge-size 2.0))
     (gimp-selection-invert img)
     (gimp-edit-clear sparkle-layer)
     (if (= edge-only TRUE)
         (begin
-          (gimp-selection-load selection)
+          (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
           (gimp-selection-shrink img (/ edge-size 2.0))
           (gimp-edit-clear sparkle-layer)
-          (gimp-selection-load selection)
+          (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
           (gimp-selection-grow img (/ edge-size 2.0))
           (gimp-selection-invert img)))
     (gimp-context-set-foreground '(0 0 0))
@@ -65,14 +64,12 @@
     (gimp-context-set-brush "Circle Fuzzy (11)")
     (gimp-selection-feather img b-size)
     (gimp-edit-fill shadow-layer BACKGROUND-FILL)
+
     (gimp-selection-none img)
-    (gimp-context-set-background base-color)
+    (gimp-context-set-background bg-color)
     (gimp-edit-fill bg-layer BACKGROUND-FILL)
-    (gimp-selection-load selection)
-    (gimp-context-set-brush "Circle Fuzzy (07)")
-    (gimp-context-set-foreground '(255 255 255))
-    (gimp-selection-none img)
-    (gimp-drawable-set-visible logo-layer 0)
+
+    (gimp-item-set-visible logo-layer 0)
     (gimp-image-set-active-layer img sparkle-layer)
 
     (gimp-context-pop)
@@ -155,4 +152,4 @@
 )
 
 (script-fu-menu-register "script-fu-t-o-p-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/test-sphere.scm b/scripts/test-sphere.scm
index 96c042b..2b4cbe1 100644
--- a/scripts/test-sphere.scm
+++ b/scripts/test-sphere.scm
@@ -194,14 +194,15 @@
                                                       font))
         (x-position (- cx (/ (car text-extents) 2)))
         (y-position (- cy (/ (cadr text-extents) 2)))
-        (shadow-w)
-        (shadow-x)
+        (shadow-w 0)
+        (shadow-x 0)
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-image-undo-disable img)
-    (gimp-image-add-layer img drawable 0)
+    (gimp-image-insert-layer img drawable 0 0)
     (gimp-context-set-foreground sphere-color)
     (gimp-context-set-background bg-color)
     (gimp-edit-fill drawable BACKGROUND-FILL)
@@ -219,14 +220,16 @@
               (begin (set! shadow-x (+ cx shadow-w))
                      (set! shadow-w (- shadow-w))))
 
-          (gimp-ellipse-select img shadow-x shadow-y shadow-w shadow-h
-                               CHANNEL-OP-REPLACE TRUE TRUE 7.5)
+          (gimp-context-set-feather TRUE)
+          (gimp-context-set-feather-radius 7.5 7.5)
+          (gimp-image-select-ellipse img CHANNEL-OP-REPLACE shadow-x shadow-y shadow-w shadow-h)
           (gimp-context-set-pattern pattern)
           (gimp-edit-bucket-fill drawable PATTERN-BUCKET-FILL MULTIPLY-MODE
-                            100 0 FALSE 0 0)))
+                                 100 0 FALSE 0 0)))
 
-    (gimp-ellipse-select img (- cx radius) (- cy radius)
-                         (* 2 radius) (* 2 radius) CHANNEL-OP-REPLACE TRUE FALSE 0)
+    (gimp-context-set-feather FALSE)
+    (gimp-image-select-ellipse img CHANNEL-OP-REPLACE (- cx radius) (- cy radius)
+                               (* 2 radius) (* 2 radius))
 
     (gimp-edit-blend drawable FG-BG-RGB-MODE NORMAL-MODE
                      GRADIENT-RADIAL 100 offset REPEAT-NONE FALSE
@@ -236,7 +239,7 @@
     (gimp-selection-none img)
 
     (gimp-context-set-gradient gradient)
-    (gimp-ellipse-select img 10 10 50 50 CHANNEL-OP-REPLACE TRUE FALSE 0)
+    (gimp-image-select-ellipse img CHANNEL-OP-REPLACE 10 10 50 50)
 
     (gimp-edit-blend drawable CUSTOM-MODE NORMAL-MODE
                      GRADIENT-LINEAR 100 offset REPEAT-NONE gradient-reverse
@@ -296,4 +299,4 @@
 )
 
 (script-fu-menu-register "script-fu-test-sphere"
-                         "<Toolbox>/Xtns/Languages/Script-Fu/Test")
+                         "<Image>/Filters/Languages/Script-Fu/Test")
diff --git a/scripts/text-circle.scm b/scripts/text-circle.scm
index 39aaab6..c1688ea 100644
--- a/scripts/text-circle.scm
+++ b/scripts/text-circle.scm
@@ -30,7 +30,7 @@
         (script-fu-text-circle-debug? #f)
         (img (car (gimp-image-new drawable-size drawable-size RGB)))
         (BG-layer (car (gimp-layer-new img drawable-size drawable-size
-                       RGBA-IMAGE "background" 100 NORMAL-MODE)))
+                            RGBA-IMAGE "background" 100 NORMAL-MODE)))
         (merged-layer #f)
         (char-num (string-length text))
         (radian-step 0)
@@ -38,7 +38,7 @@
         (center-x (/ drawable-size 2))
         (center-y center-x)
         (font-infos (gimp-text-get-extents-fontname "lAgy" font-size
-                                PIXELS font-name))
+                                                     PIXELS font-name))
         (desc (nth 3 font-infos))
         (start-angle-rad (* (/ (modulo start-angle 360) 360) 2 *pi*))
         (angle-list #f)
@@ -49,13 +49,16 @@
         (ndx-start 0)
         (ndx-step 1)
         (ccw 0)
-        (fill-angle-rad)
-        (rot-op)
-        (radian-step)
+        (fill-angle-rad 0)
+        (rot-op 0)
+        (radian-step 0)
         )
 
+    (gimp-context-push)
+    (gimp-context-set-defaults)
+    (gimp-context-set-antialias antialias)
     (gimp-image-undo-disable img)
-    (gimp-image-add-layer img BG-layer 0)
+    (gimp-image-insert-layer img BG-layer 0 0)
     (gimp-edit-fill BG-layer BACKGROUND-FILL)
 
     ;; change units
@@ -92,10 +95,10 @@
             (set! temp-str "x")
         )
         (set! temp-layer (car (gimp-text-fontname img -1 0 0
-                              temp-str
-                              1 antialias
-                              font-size PIXELS
-                              font-name)))
+                                                  temp-str
+                                                  1 antialias
+                                                  font-size PIXELS
+                                                  font-name)))
         (set! temp-list (cons (car (gimp-drawable-width temp-layer)) temp-list))
         (gimp-image-remove-layer img temp-layer)
         (set! ndx (+ ndx ndx-step))
@@ -125,10 +128,10 @@
         ;; Running gimp-text with " " causes an error!
         (let* (
               (new-layer (car (gimp-text-fontname img -1 0 0
-                                       letter
-                                       1 antialias
-                                       font-size PIXELS
-                                       font-name)))
+                                                  letter
+                                                  1 antialias
+                                                  font-size PIXELS
+                                                  font-name)))
               (width (car (gimp-drawable-width new-layer)))
               (height (car (gimp-drawable-height new-layer)))
               (rotate-radius (- (/ height 2) desc))
@@ -143,10 +146,9 @@
                   (set! rot-op (if (< 0 fill-angle-rad) + -))
                   (set! rot-op (if (> 0 fill-angle-rad) + -))
               )
-              (gimp-drawable-transform-rotate-default new-layer
-                       (rot-op angle rad-90)
-                       TRUE 0 0
-                       TRUE FALSE)
+              (gimp-item-transform-rotate new-layer
+                                          (rot-op angle rad-90)
+                                          TRUE 0 0)
               (gimp-layer-translate new-layer
                    (+ center-x
                       (* radius (cos angle))
@@ -179,12 +181,12 @@
       (set! index (+ index 1))
     )
 
-    (gimp-drawable-set-visible BG-layer 0)
+    (gimp-item-set-visible BG-layer 0)
     (if (not script-fu-text-circle-debug?)
       (begin
         (set! merged-layer
                 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
-        (gimp-drawable-set-name merged-layer
+        (gimp-item-set-name merged-layer
                      (if (< (string-length text) 16)
                          (wrap-string text)
                          "Text Circle"
@@ -192,10 +194,11 @@
         )
       )
     )
-    (gimp-drawable-set-visible BG-layer 1)
+    (gimp-item-set-visible BG-layer 1)
     (gimp-image-undo-enable img)
     (gimp-image-clean-all img)
     (gimp-display-new img)
+    (gimp-context-pop)
     (gimp-displays-flush)
   )
 )
@@ -217,4 +220,4 @@
 )
 
 (script-fu-menu-register "script-fu-text-circle"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/textured-logo.scm b/scripts/textured-logo.scm
index 9a7725a..d6ff45c 100644
--- a/scripts/textured-logo.scm
+++ b/scripts/textured-logo.scm
@@ -37,12 +37,11 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (script-fu-util-image-resize-from-layer img logo-layer)
-    (gimp-image-add-layer img shadow-layer 1)
-    (gimp-image-add-layer img blend-layer 1)
-    (gimp-image-add-layer img drop-shadow-layer 1)
-    (gimp-image-add-layer img text-shadow-layer 0)
+    (script-fu-util-image-add-layers img text-shadow-layer drop-shadow-layer blend-layer shadow-layer)
+    (gimp-image-raise-item img text-shadow-layer)
     (gimp-selection-all img)
     (gimp-context-set-pattern text-pattern)
     (gimp-layer-set-lock-alpha logo-layer TRUE)
@@ -52,11 +51,12 @@
     (gimp-edit-clear drop-shadow-layer)
     (gimp-context-set-background bg-color)
     (gimp-drawable-fill shadow-layer BACKGROUND-FILL)
-    (gimp-rect-select img b-size-2 b-size-2 (- width b-size) (- height b-size)
-                      CHANNEL-OP-REPLACE TRUE b-size-2)
+    (gimp-context-set-feather-radius b-size-2 b-size-2)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE b-size-2 b-size-2 (- width b-size) (- height b-size))
+    (gimp-context-set-feather FALSE)
     (gimp-context-set-background '(0 0 0))
     (gimp-edit-fill shadow-layer BACKGROUND-FILL)
-    (gimp-selection-layer-alpha logo-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
     (gimp-layer-add-mask text-shadow-layer tsl-layer-mask)
     (gimp-context-set-background '(255 255 255))
     (gimp-edit-fill tsl-layer-mask BACKGROUND-FILL)
@@ -88,7 +88,7 @@
     (gimp-layer-translate blend-layer (- b-size) (- b-size))
     (gimp-layer-translate text-shadow-layer (- ts-size) (- ts-size))
     (gimp-layer-translate drop-shadow-layer ds-size ds-size)
-    (gimp-selection-layer-alpha blend-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE blend-layer)
     (gimp-layer-add-mask drop-shadow-layer dsl-layer-mask)
     (gimp-context-set-background '(255 255 255))
     (gimp-edit-fill dsl-layer-mask BACKGROUND-FILL)
@@ -177,4 +177,4 @@
 )
 
 (script-fu-menu-register "script-fu-textured-logo"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/tileblur.scm b/scripts/tileblur.scm
index bea47c2..2f01eb6 100644
--- a/scripts/tileblur.scm
+++ b/scripts/tileblur.scm
@@ -1,9 +1,9 @@
 ; Chris Gutteridge (cjg ecs soton ac uk)
 ; At ECS Dept, University of Southampton, England.
 
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -12,8 +12,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 (define (script-fu-tile-blur inImage inLayer inRadius inVert inHoriz inType)
@@ -32,10 +31,13 @@
        )
     )
 
+    (gimp-context-push)
+    (gimp-context-set-feather FALSE)
     (gimp-image-undo-group-start theImage)
+
     (gimp-layer-resize theLayer (* 3 theWidth) (* 3 theHeight) 0 0)
 
-    (gimp-rect-select theImage 0 0 theWidth theHeight CHANNEL-OP-REPLACE 0 0)
+    (gimp-image-select-rectangle theImage CHANNEL-OP-REPLACE 0 0 theWidth theHeight)
     (gimp-edit-cut theLayer)
 
     (gimp-selection-none theImage)
@@ -48,9 +50,9 @@
     (gimp-selection-none theImage)
     (if (= inType 0)
         (plug-in-gauss-iir RUN-NONINTERACTIVE
-                          theImage theLayer inRadius inHoriz inVert)
+                           theImage theLayer inRadius inHoriz inVert)
         (plug-in-gauss-rle RUN-NONINTERACTIVE
-                          theImage theLayer inRadius inHoriz inVert)
+                           theImage theLayer inRadius inHoriz inVert)
     )
 
     (gimp-layer-resize theLayer
@@ -58,6 +60,7 @@
     (gimp-layer-set-offsets theLayer 0 0)
     (gimp-image-undo-group-end theImage)
     (gimp-displays-flush)
+    (gimp-context-pop)
   )
 )
 
diff --git a/scripts/title-header.scm b/scripts/title-header.scm
index 2d3dc2c..cca47f1 100644
--- a/scripts/title-header.scm
+++ b/scripts/title-header.scm
@@ -13,9 +13,9 @@
 ; (although it is not used) otherwise gimp 1.1 crashed.
 ; ************************************************************************
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -24,8 +24,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 (define (script-fu-title-header text
@@ -80,19 +79,20 @@
        )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     ; Create image
 
     (gimp-image-undo-disable img)
     (gimp-image-resize img img-width img-height 0 0)
 
-    (gimp-image-add-layer img bg-layer -1)
-    (gimp-image-add-layer img bumpmap-layer -1)
-    (gimp-image-add-layer img fore-layer -1)
-;    (gimp-image-add-layer img text-layer -1)
-    (gimp-image-raise-layer img text-layer)
-    (gimp-image-raise-layer img text-layer)
-    (gimp-image-raise-layer img text-layer)
+    (gimp-image-insert-layer img bg-layer 0 -1)
+    (gimp-image-insert-layer img bumpmap-layer 0 -1)
+    (gimp-image-insert-layer img fore-layer 0 -1)
+;    (gimp-image-insert-layer img text-layer 0 -1)
+    (gimp-image-raise-item img text-layer)
+    (gimp-image-raise-item img text-layer)
+    (gimp-image-raise-item img text-layer)
     (gimp-layer-set-offsets bg-layer 0 0)
     (gimp-layer-set-offsets text-layer text-layers-offset 0)
     (gimp-layer-set-offsets bumpmap-layer text-layers-offset 0)
@@ -102,7 +102,7 @@
 
     (gimp-context-set-background '(0 0 0))
     (gimp-edit-fill bumpmap-layer BACKGROUND-FILL)
-    (gimp-selection-layer-alpha text-layer)
+    (gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
     (gimp-context-set-background '(255 255 255))
     (gimp-edit-fill bumpmap-layer BACKGROUND-FILL)
     (gimp-selection-none img)
@@ -116,7 +116,7 @@
 
     ; Text layer
 
-    (gimp-drawable-set-visible text-layer TRUE)
+    (gimp-item-set-visible text-layer TRUE)
     (gimp-layer-set-lock-alpha text-layer TRUE)
 
     (gimp-edit-blend text-layer CUSTOM-MODE NORMAL-MODE
@@ -130,7 +130,7 @@
     (gimp-context-set-background '(0 0 0))
     (gimp-edit-fill bg-layer BACKGROUND-FILL)
 
-    (gimp-ellipse-select img 0 0 text-height text-height CHANNEL-OP-REPLACE TRUE FALSE 0)
+    (gimp-image-select-ellipse img CHANNEL-OP-REPLACE 0 0 text-height text-height)
     (gimp-context-set-background (car (gimp-image-pick-color img text-layer
                                                              text-layers-offset 0
                                                              TRUE FALSE 0)))
@@ -138,8 +138,9 @@
 
     ; Fade-out gradient at the right
 
-    (gimp-rect-select img (- img-width fade-width) 0 fade-width text-height
-                      CHANNEL-OP-REPLACE FALSE 0)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE
+                                 (- img-width fade-width) 0
+                                 fade-width text-height)
     (gimp-context-set-foreground (car (gimp-context-get-background)))
     (gimp-context-set-background '(0 0 0))
 
@@ -174,4 +175,4 @@
 )
 
 (script-fu-menu-register "script-fu-title-header"
-                         "<Toolbox>/Xtns/Logos")
+                         "<Image>/File/Create/Logos")
diff --git a/scripts/truchet.scm b/scripts/truchet.scm
index 516c388..312eb16 100644
--- a/scripts/truchet.scm
+++ b/scripts/truchet.scm
@@ -1,9 +1,9 @@
 ; GIMP - The GNU Image Manipulation Program
 ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -12,8 +12,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;
 ;    Truchet  - a script to create Truchet patterns
 ;                 by Adrian Likins <aklikins eos ncsu edu>
@@ -28,8 +27,12 @@
 ;  NOTE: This script works best with even values for 'thickness'.
 
 (define (center-ellipse img cx cy rx ry op aa feather frad)
-  (gimp-ellipse-select img (- cx rx) (- cy ry) (+ rx rx ) (+ ry ry )
-                       op aa feather frad)
+  (gimp-context-push)
+  (gimp-context-set-antialias aa)
+  (gimp-context-set-feather feather)
+  (gimp-context-set-feather-radius frad frad)
+  (gimp-image-select-ellipse img op (- cx rx) (- cy ry) (+ rx rx ) (+ ry ry ))
+  (gimp-context-pop)
 )
 
 (define (use-tiles img drawable height width img2 drawable2 xoffset yoffset)
@@ -48,6 +51,8 @@
         (inner-radius (- (/ size 2) half-thickness))
         )
 
+    (gimp-context-push)
+
     (gimp-selection-all img)
     (gimp-context-set-background backcolor)
     (gimp-edit-fill drawable1 BACKGROUND-FILL)
@@ -56,9 +61,9 @@
           (tempSize (* size 3))
           (temp-img (car (gimp-image-new tempSize tempSize RGB)))
           (temp-draw (car (gimp-layer-new temp-img tempSize tempSize RGB-IMAGE "Jabar" 100 NORMAL-MODE)))
-         )
+          )
       (gimp-image-undo-disable temp-img)
-      (gimp-image-add-layer temp-img temp-draw 0)
+      (gimp-image-insert-layer temp-img temp-draw 0 0)
       (gimp-context-set-background backcolor)
       (gimp-edit-fill temp-draw BACKGROUND-FILL)
 
@@ -66,8 +71,8 @@
       (center-ellipse temp-img size size outer-radius outer-radius CHANNEL-OP-REPLACE TRUE FALSE 0)
       (center-ellipse temp-img size size inner-radius inner-radius CHANNEL-OP-SUBTRACT TRUE FALSE 0)
 
-      (center-ellipse temp-img (* size 2) (*  size 2)  outer-radius outer-radius CHANNEL-OP-ADD TRUE FALSE 0)
-      (center-ellipse temp-img (* size 2) (*  size 2)  inner-radius inner-radius CHANNEL-OP-SUBTRACT TRUE 
FALSE 0)
+      (center-ellipse temp-img (* size 2) (* size 2) outer-radius outer-radius CHANNEL-OP-ADD TRUE FALSE 0)
+      (center-ellipse temp-img (* size 2) (* size 2) inner-radius inner-radius CHANNEL-OP-SUBTRACT TRUE 
FALSE 0)
       (gimp-context-set-background forecolor)
       (gimp-edit-fill temp-draw BACKGROUND-FILL)
 
@@ -86,12 +91,14 @@
       (let ((floating-sel (car (gimp-edit-paste drawable1 FALSE))))
         (gimp-floating-sel-anchor floating-sel))
 
-      (let ((drawble (car (gimp-drawable-transform-flip-simple drawable1
-                             ORIENTATION-VERTICAL TRUE 0 TRUE)))))
+      (gimp-context-set-transform-resize TRANSFORM-RESIZE-CLIP)
+      (let ((drawble (car (gimp-item-transform-flip-simple drawable1
+                               ORIENTATION-VERTICAL TRUE 0)))))
 
 
       ;(gimp-display-new temp-img)
       (gimp-image-delete temp-img)
+      (gimp-context-pop)
     )
   )
 )
@@ -114,13 +121,14 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-image-undo-disable img)
     (gimp-image-undo-disable tile)
 
-    (gimp-image-add-layer img layer-one 0)
-    (gimp-image-add-layer tile tiledraw1 0)
-    (gimp-image-add-layer tile tiledraw2 0)
+    (gimp-image-insert-layer img layer-one 0 0)
+    (gimp-image-insert-layer tile tiledraw1 0 0)
+    (gimp-image-insert-layer tile tiledraw2 0 0)
 
 
     ;just to look a little better
@@ -169,4 +177,4 @@
 )
 
 (script-fu-menu-register "script-fu-truchet"
-                         "<Toolbox>/Xtns/Patterns")
+                         "<Image>/File/Create/Patterns")
diff --git a/scripts/ts-helloworld.scm b/scripts/ts-helloworld.scm
index 1b80c46..90fd92e 100644
--- a/scripts/ts-helloworld.scm
+++ b/scripts/ts-helloworld.scm
@@ -8,9 +8,9 @@
 ; GIMP - The GNU Image Manipulation Program
 ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -19,8 +19,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;
 ; Tiny-Fu first successfully ran this script at 2:07am on March 6, 2004.
 
@@ -63,4 +62,4 @@
 )
 
 (script-fu-menu-register "script-fu-helloworld"
-                         "<Toolbox>/Xtns/Languages/Script-Fu/Test")
+                         "<Image>/Filters/Languages/Script-Fu/Test")
diff --git a/scripts/unsharp-mask.scm b/scripts/unsharp-mask.scm
index 34bde80..5df3d57 100644
--- a/scripts/unsharp-mask.scm
+++ b/scripts/unsharp-mask.scm
@@ -12,12 +12,12 @@
                                              drawable-width drawable-height
                                              RGB-IMAGE "Original"
                                              100 NORMAL-MODE)))
-        (original-layer-for-darker)
-        (original-layer-for-lighter)
-        (blured-layer-for-darker)
-        (blured-layer-for-lighter)
-        (darker-layer)
-        (lighter-layer)
+        (original-layer-for-darker 0)
+        (original-layer-for-lighter 0)
+        (blured-layer-for-darker 0)
+        (blured-layer-for-lighter 0)
+        (darker-layer 0)
+        (lighter-layer 0)
         )
 
     (gimp-selection-all img)
@@ -25,45 +25,45 @@
 
     (gimp-image-undo-disable new-image)
 
-    (gimp-image-add-layer new-image original-layer 0)
+    (gimp-image-insert-layer new-image original-layer 0 0)
     (gimp-floating-sel-anchor
       (car (gimp-edit-paste original-layer FALSE)))
 
     (set! original-layer-for-darker (car (gimp-layer-copy original-layer TRUE)))
     (set! original-layer-for-lighter (car (gimp-layer-copy original-layer TRUE)))
     (set! blured-layer-for-darker (car (gimp-layer-copy original-layer TRUE)))
-    (gimp-drawable-set-visible original-layer FALSE)
+    (gimp-item-set-visible original-layer FALSE)
     (gimp-display-new new-image)
 
     ;; make darker mask
-    (gimp-image-add-layer new-image blured-layer-for-darker -1)
+    (gimp-image-insert-layer new-image blured-layer-for-darker 0 -1)
     (plug-in-gauss-iir RUN-NONINTERACTIVE
                       new-image blured-layer-for-darker mask-size TRUE TRUE)
     (set! blured-layer-for-lighter
           (car (gimp-layer-copy blured-layer-for-darker TRUE)))
-    (gimp-image-add-layer new-image original-layer-for-darker -1)
+    (gimp-image-insert-layer new-image original-layer-for-darker 0 -1)
     (gimp-layer-set-mode original-layer-for-darker SUBTRACT-MODE)
     (set! darker-layer
           (car (gimp-image-merge-visible-layers new-image CLIP-TO-IMAGE)))
-    (gimp-drawable-set-name darker-layer "darker mask")
-    (gimp-drawable-set-visible darker-layer FALSE)
+    (gimp-item-set-name darker-layer "darker mask")
+    (gimp-item-set-visible darker-layer FALSE)
 
     ;; make lighter mask
-    (gimp-image-add-layer new-image original-layer-for-lighter -1)
-    (gimp-image-add-layer new-image blured-layer-for-lighter -1)
+    (gimp-image-insert-layer new-image original-layer-for-lighter 0 -1)
+    (gimp-image-insert-layer new-image blured-layer-for-lighter 0 -1)
     (gimp-layer-set-mode blured-layer-for-lighter SUBTRACT-MODE)
     (set! lighter-layer
           (car (gimp-image-merge-visible-layers new-image CLIP-TO-IMAGE)))
-    (gimp-drawable-set-name lighter-layer "lighter mask")
+    (gimp-item-set-name lighter-layer "lighter mask")
 
     ;; combine them
-    (gimp-drawable-set-visible original-layer TRUE)
+    (gimp-item-set-visible original-layer TRUE)
     (gimp-layer-set-mode darker-layer SUBTRACT-MODE)
     (gimp-layer-set-opacity darker-layer mask-opacity)
-    (gimp-drawable-set-visible darker-layer TRUE)
+    (gimp-item-set-visible darker-layer TRUE)
     (gimp-layer-set-mode lighter-layer ADDITION-MODE)
     (gimp-layer-set-opacity lighter-layer mask-opacity)
-    (gimp-drawable-set-visible lighter-layer TRUE)
+    (gimp-item-set-visible lighter-layer TRUE)
 
     (gimp-image-undo-enable new-image)
     (gimp-displays-flush)
diff --git a/scripts/waves-anim.scm b/scripts/waves-anim.scm
index c744a78..4284bda 100644
--- a/scripts/waves-anim.scm
+++ b/scripts/waves-anim.scm
@@ -1,9 +1,9 @@
 ; GIMP - The GNU Image Manipulation Program
 ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -12,8 +12,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;
 ;
 ; waves-anim.scm   version 1.01   1997/12/13
@@ -60,8 +59,8 @@
                                      " (replace)"))
           )
     (gimp-layer-set-lock-alpha waves-layer FALSE)
-    (gimp-image-add-layer image waves-layer -1)
-    (gimp-drawable-set-name waves-layer layer-name)
+    (gimp-image-insert-layer image waves-layer 0 -1)
+    (gimp-item-set-name waves-layer layer-name)
 
     (plug-in-waves RUN-NONINTERACTIVE
                    image
@@ -77,7 +76,7 @@
     )
   )
 
-  (gimp-drawable-set-name source-layer "Frame 1")
+  (gimp-item-set-name source-layer "Frame 1")
   (plug-in-waves RUN-NONINTERACTIVE
                  image
                  source-layer
diff --git a/scripts/weave.scm b/scripts/weave.scm
index 444bff9..28fdb1c 100644
--- a/scripts/weave.scm
+++ b/scripts/weave.scm
@@ -5,9 +5,9 @@
 ; Copyright (C) 1997 Federico Mena Quintero
 ; federico nuclecu unam mx
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -16,8 +16,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 ; Copies the specified rectangle from/to the specified drawable
@@ -30,7 +29,7 @@
                         height
                         dest-x
                         dest-y)
-  (gimp-rect-select img x1 y1 width height CHANNEL-OP-REPLACE FALSE 0)
+  (gimp-image-select-rectangle img CHANNEL-OP-REPLACE x1 y1 width height)
   (gimp-edit-copy drawable)
   (let ((floating-sel (car (gimp-edit-paste drawable FALSE))))
     (gimp-layer-set-offsets floating-sel dest-x dest-y)
@@ -48,8 +47,9 @@
          (img (car (gimp-image-new tile-size tile-size RGB)))
          (drawable (car (gimp-layer-new img tile-size tile-size RGB-IMAGE
                                         "Weave tile" 100 NORMAL-MODE))))
+
     (gimp-image-undo-disable img)
-    (gimp-image-add-layer img drawable 0)
+    (gimp-image-insert-layer img drawable 0 0)
 
     (gimp-context-set-background '(0 0 0))
     (gimp-edit-fill drawable BACKGROUND-FILL)
@@ -59,14 +59,12 @@
     (gimp-context-set-foreground '(255 255 255))
     (gimp-context-set-background (list darkness darkness darkness))
 
-    (gimp-rect-select img
-                      0
-                      ribbon-spacing
-                      (+ (* 2 ribbon-spacing) ribbon-width)
-                      ribbon-width
-                      CHANNEL-OP-REPLACE
-                      FALSE
-                      0)
+    (gimp-image-select-rectangle img
+                                 CHANNEL-OP-REPLACE
+                                 0
+                                 ribbon-spacing
+                                 (+ (* 2 ribbon-spacing) ribbon-width)
+                                 ribbon-width)
 
     (gimp-edit-blend drawable FG-BG-RGB-MODE NORMAL-MODE
                      GRADIENT-BILINEAR 100 (- 100 shadow-depth) REPEAT-NONE FALSE
@@ -75,14 +73,12 @@
 
     ; Create main vertical ribbon
 
-    (gimp-rect-select img
-                      (+ (* 2 ribbon-spacing) ribbon-width)
-                      0
-                      ribbon-width
-                      (+ (* 2 ribbon-spacing) ribbon-width)
-                      CHANNEL-OP-REPLACE
-                      FALSE
-                      0)
+    (gimp-image-select-rectangle img
+                                 CHANNEL-OP-REPLACE
+                                 (+ (* 2 ribbon-spacing) ribbon-width)
+                                 0
+                                 ribbon-width
+                                 (+ (* 2 ribbon-spacing) ribbon-width))
 
     (gimp-edit-blend drawable FG-BG-RGB-MODE NORMAL-MODE
                      GRADIENT-BILINEAR 100 (- 100 shadow-depth) REPEAT-NONE FALSE
@@ -132,7 +128,6 @@
     ; Done
 
     (gimp-image-undo-enable img)
-
     (list img drawable)))
 
 ; Creates a complete weaving mask
@@ -172,14 +167,14 @@
          (drawable (car (gimp-layer-new img tile-size tile-size RGB-IMAGE
                                         "Mask" 100 NORMAL-MODE))))
     (gimp-image-undo-disable img)
-    (gimp-image-add-layer img drawable 0)
+    (gimp-image-insert-layer img drawable 0 0)
 
     (gimp-context-set-background '(0 0 0))
     (gimp-edit-fill drawable BACKGROUND-FILL)
 
-    (gimp-rect-select img r1-x1 r1-y1 r1-width r1-height CHANNEL-OP-REPLACE FALSE 0)
-    (gimp-rect-select img r2-x1 r2-y1 r2-width r2-height CHANNEL-OP-ADD FALSE 0)
-    (gimp-rect-select img r3-x1 r3-y1 r3-width r3-height CHANNEL-OP-ADD FALSE 0)
+    (gimp-image-select-rectangle img CHANNEL-OP-REPLACE r1-x1 r1-y1 r1-width r1-height)
+    (gimp-image-select-rectangle img CHANNEL-OP-ADD r2-x1 r2-y1 r2-width r2-height)
+    (gimp-image-select-rectangle img CHANNEL-OP-ADD r3-x1 r3-y1 r3-width r3-height)
 
     (gimp-context-set-background '(255 255 255))
     (gimp-edit-fill drawable BACKGROUND-FILL)
@@ -275,7 +270,7 @@
   (let* ((drawable (car (gimp-layer-new img width height RGBA-IMAGE
                                         "Threads" 100 NORMAL-MODE)))
          (dense (/ density 100.0)))
-    (gimp-image-add-layer img drawable -1)
+    (gimp-image-insert-layer img drawable 0 -1)
     (gimp-context-set-background '(255 255 255))
     (gimp-edit-fill drawable BACKGROUND-FILL)
     (plug-in-noisify RUN-NONINTERACTIVE img drawable FALSE dense dense dense dense)
@@ -352,7 +347,7 @@
                          thread-density
                          thread-intensity)
   (let* (
-        (d-img (car (gimp-drawable-get-image drawable)))
+        (d-img (car (gimp-item-get-image drawable)))
         (d-width (car (gimp-drawable-width drawable)))
         (d-height (car (gimp-drawable-height drawable)))
         (d-offsets (gimp-drawable-offsets drawable))
@@ -371,6 +366,7 @@
         )
 
     (gimp-context-push)
+    (gimp-context-set-feather FALSE)
 
     (gimp-selection-all w-img)
     (gimp-edit-copy w-layer)
diff --git a/scripts/xach-effect.scm b/scripts/xach-effect.scm
index 71a27d0..679f97f 100644
--- a/scripts/xach-effect.scm
+++ b/scripts/xach-effect.scm
@@ -8,9 +8,9 @@
 ; based on a idea by Xach Beane <xach mint net>
 ;
 ;
-; This program is free software; you can redistribute it and/or modify
+; This program is free software: you can redistribute it and/or modify
 ; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
+; the Free Software Foundation; either version 3 of the License, or
 ; (at your option) any later version.
 ;
 ; This program is distributed in the hope that it will be useful,
@@ -19,8 +19,7 @@
 ; GNU General Public License for more details.
 ;
 ; You should have received a copy of the GNU General Public License
-; along with this program; if not, write to the Free Software
-; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 (define (script-fu-xach-effect image
@@ -43,41 +42,42 @@
         (image-width (car (gimp-image-width image)))
         (hl-opacity (list hl-opacity-comp hl-opacity-comp hl-opacity-comp))
         (image-height (car (gimp-image-height image)))
-        (active-selection)
-        (from-selection)
-        (theLayer)
-        (hl-layer)
-        (shadow-layer)
-        (mask)
+        (active-selection 0)
+        (from-selection 0)
+        (theLayer 0)
+        (hl-layer 0)
+        (shadow-layer 0)
+        (mask 0)
         )
 
     (gimp-context-push)
+    (gimp-context-set-defaults)
 
     (gimp-image-undo-group-start image)
     (gimp-layer-add-alpha drawable)
 
     (if (= (car (gimp-selection-is-empty image)) TRUE)
         (begin
-          (gimp-selection-layer-alpha drawable)
+          (gimp-image-select-item image CHANNEL-OP-REPLACE drawable)
           (set! active-selection (car (gimp-selection-save image)))
           (set! from-selection FALSE))
         (begin
           (set! from-selection TRUE)
           (set! active-selection (car (gimp-selection-save image)))))
 
-    (set! hl-layer (car (gimp-layer-new image image-width image-height type "Highlight" 100 NORMAL-MODE)))
-    (gimp-image-add-layer image hl-layer -1)
+    (set! hl-layer (car (gimp-layer-new image image-width image-height type _"Highlight" 100 NORMAL-MODE)))
+    (gimp-image-insert-layer image hl-layer 0 -1)
 
     (gimp-selection-none image)
     (gimp-edit-clear hl-layer)
-    (gimp-selection-load active-selection)
+    (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
 
     (gimp-context-set-background hl-color)
     (gimp-edit-fill hl-layer BACKGROUND-FILL)
     (gimp-selection-translate image hl-offset-x hl-offset-y)
     (gimp-edit-fill hl-layer BACKGROUND-FILL)
     (gimp-selection-none image)
-    (gimp-selection-load active-selection)
+    (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
 
     (set! mask (car (gimp-layer-create-mask hl-layer ADD-WHITE-MASK)))
     (gimp-layer-add-mask hl-layer mask)
@@ -89,21 +89,21 @@
                                             image-width
                                             image-height
                                             type
-                                            "Shadow"
+                                            _"Shadow"
                                             ds-opacity
                                             NORMAL-MODE)))
-    (gimp-image-add-layer image shadow-layer -1)
+    (gimp-image-insert-layer image shadow-layer 0 -1)
     (gimp-selection-none image)
     (gimp-edit-clear shadow-layer)
-    (gimp-selection-load active-selection)
+    (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
     (gimp-selection-translate image ds-offset-x ds-offset-y)
     (gimp-context-set-background ds-color)
     (gimp-edit-fill shadow-layer BACKGROUND-FILL)
     (gimp-selection-none image)
     (plug-in-gauss-rle RUN-NONINTERACTIVE image shadow-layer ds-blur TRUE TRUE)
-    (gimp-selection-load active-selection)
+    (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
     (gimp-edit-clear shadow-layer)
-    (gimp-image-lower-layer image shadow-layer)
+    (gimp-image-lower-item image shadow-layer)
 
     (if (= keep-selection FALSE)
         (gimp-selection-none image))


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