Index: /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/adapters.py
===================================================================
--- /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/adapters.py	(revision 1957)
+++ /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/adapters.py	(revision 1958)
@@ -1,12 +1,7 @@
-import re, commands
+import re
 
-from zope.component import adapts
 from zope.interface import implements
 from zope.component import queryAdapter
 from zope.component import queryMultiAdapter
-
-from Acquisition import aq_inner
-from OFS.interfaces import IPropertyManager
-from Products.CMFCore.utils import getToolByName
 
 from quintagroup.seoptimizer.util import SortedDict
@@ -67,3 +62,2 @@
                     metadata_name[mt] = METADATA_MAPS[mt]
         return metadata_name
-
Index: /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/browser/keywords.py
===================================================================
--- /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/browser/keywords.py	(revision 1957)
+++ /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/browser/keywords.py	(revision 1958)
@@ -1,4 +1,4 @@
-import urllib, re, os, commands
-from xml.dom import minidom, Node
+import re, commands
+from xml.dom import Node
 
 from zope.interface import implements
@@ -51,30 +51,2 @@
                                mapping={'result':'\n'.join(result)}),
                              context=self.context)
-
-    def walkTextNodes(self, parent, page_words=[]):
-        for node in parent.childNodes:
-            if node.nodeType == Node.ELEMENT_NODE:
-                self.walkTextNodes(node, page_words)
-            elif node.nodeType == Node.TEXT_NODE:
-                value = node.nodeValue
-                if value is not None:
-                    page_words.extend(map(lambda x: x.lower(), value.split()))
-
-    def strip_tags(self, in_text):
-        s_list = list(in_text)
-        i,j = 0,0
-
-        while i < len(s_list):
-            if s_list[i] == '<':
-                while s_list[i] != '>':
-                    # pop everything from the the left-angle bracket until the right-angle bracket
-                    s_list.pop(i)
-
-                # pops the right-angle bracket, too
-                s_list.pop(i)
-            else:
-                i=i+1
-
-        # convert the list back into text
-        join_char=''
-        return join_char.join(s_list)
Index: /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/browser/seo_configlet.py
===================================================================
--- /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/browser/seo_configlet.py	(revision 1957)
+++ /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/browser/seo_configlet.py	(revision 1958)
@@ -3,11 +3,7 @@
 from zope.interface import implements
 from zope.component import adapts
-from zope.schema.vocabulary import SimpleTerm
-from zope.schema.vocabulary import SimpleVocabulary
-from zope.schema import Bool, Text, Choice, Tuple, List
+from zope.schema import Bool, Choice, Tuple, List
 from zope.schema import SourceText
-from zope.app.form.browser import RadioWidget
 
-from zope.formlib.form import FormFields
 from zope.app.component.hooks import getSite
 from zope.app.form.browser import TextAreaWidget
Index: /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/browser/viewlets.py
===================================================================
--- /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/browser/viewlets.py	(revision 1957)
+++ /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/browser/viewlets.py	(revision 1958)
@@ -9,5 +9,4 @@
 
 from Products.CMFPlone.utils import safe_unicode, getSiteEncoding
-from Products.CMFCore.utils import getToolByName
 
 from quintagroup.seoptimizer.util import SortedDict
Index: /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/browser/views.py
===================================================================
--- /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/browser/views.py	(revision 1957)
+++ /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/browser/views.py	(revision 1958)
@@ -1,5 +1,4 @@
-from sets import Set
 from time import time
-from DateTime import DateTime 
+from DateTime import DateTime
 from Acquisition import aq_inner
 from zope.component import queryAdapter
@@ -8,16 +7,12 @@
 
 from plone.memoize import view, ram
-from plone.app.controlpanel.form import ControlPanelView
 
 from Products.Five.browser import BrowserView
+from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
 from Products.CMFPlone.utils import getSiteEncoding
-from Products.CMFCore.utils import getToolByName
-from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
-from Products.CMFPlone import PloneMessageFactory as pmf
 
 from quintagroup.canonicalpath.interfaces import ICanonicalLink
 from quintagroup.canonicalpath.adapters import PROPERTY_LINK as CANONICAL_PROPERTY
 
-from quintagroup.seoptimizer import interfaces
 from quintagroup.seoptimizer.browser.seo_configlet import ISEOConfigletSchema
 from quintagroup.seoptimizer import SeoptimizerMessageFactory as _
@@ -97,5 +92,6 @@
     def seo_customMetaTags( self ):
         """Returned seo custom metatags from default_custom_metatags property in seo_properties
-        (global seo custom metatags) with update from seo custom metatags properties in context (local seo custom metatags).
+           (global seo custom metatags) with update from seo custom metatags properties
+           in context (local seo custom metatags).
         """
         glob, loc = self.seo_globalCustomMetaTags(), self.seo_localCustomMetaTags()
@@ -108,5 +104,6 @@
     def seo_globalWithoutLocalCustomMetaTags( self ):
         """Returned seo custom metatags from default_custom_metatags property in seo_properties
-        (global seo custom metatags) without seo custom metatags from properties in context (local seo custom metatags).
+           (global seo custom metatags) without seo custom metatags from properties
+           in context (local seo custom metatags).
         """
         glob, loc = self.seo_globalCustomMetaTags(), self.seo_localCustomMetaTags()
@@ -156,5 +153,5 @@
         """
         """
-        return condition and first or second 
+        return condition and first or second
 
     def validateSEOProperty(self, property, value):
@@ -166,7 +163,7 @@
         """ Add a new property.
 
-        Sets a new property with the given id, value and type or changes it.
-        """
-        context = aq_inner(self.context) 
+            Sets a new property with the given id, value and type or changes it.
+        """
+        context = aq_inner(self.context)
         state = self.validateSEOProperty(property, value)
         if not state:
@@ -254,6 +251,6 @@
         """ Update seo custom metatags properties, if enabled checkbox override or delete properties.
 
-        Change object properties by passing either a mapping object
-        of name:value pairs {'foo':6} or passing name=value parameters.
+            Change object properties by passing either a mapping object
+            of name:value pairs {'foo':6} or passing name=value parameters.
         """
         context = aq_inner(self.context)
@@ -282,5 +279,6 @@
 
     def __call__( self ):
-        """ Perform the update seo properties and redirect if necessary, or render the page Call method.
+        """ Perform the update seo properties and redirect if necessary,
+            or render the page Call method.
         """
         context = aq_inner(self.context)
Index: /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/config.py
===================================================================
--- /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/config.py	(revision 1957)
+++ /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/config.py	(revision 1958)
@@ -1,15 +1,1 @@
 PROJECT_NAME = 'quintagroup.seoptimizer'
-
-GLOBALS = globals()
-
-PROPERTY_SHEET = 'seo_properties'
-SHEET_TITLE = 'SEO Properties'
-
-STOP_WORDS = ['a', 'an', 'amp', 'and', 'are', 'arial', 'as', 'at', 'be', 'but',
-    'by', 'can', 'com', 'do', 'font', 'for', 'from', 'gif', 'had', 'has',
-    'have', 'he', 'helvetica', 'her', 'his', 'how', 'href', 'i', 'if', 'in',
-    'is', 'it', 'javascript', 'jpg', 'made', 'net', 'of', 'on', 'or', 'org',
-    'our', 'sans', 'see', 'serif', 'she', 'that', 'the', 'this', 'to', 'us',
-    'we', 'with', 'you', 'your']
-
-DEFAULT_CUSTOM_METATAGS = []
Index: /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/interfaces.py
===================================================================
--- /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/interfaces.py	(revision 1957)
+++ /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/interfaces.py	(revision 1958)
@@ -1,4 +1,3 @@
 from zope.interface import Interface
-from quintagroup.canonicalpath.interfaces import ICanonicalPath
 
 class IMetaKeywords(Interface):
Index: /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/listMetaTags.py
===================================================================
--- /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/listMetaTags.py	(revision 1957)
+++ /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/listMetaTags.py	(revision 1958)
@@ -9,5 +9,4 @@
     if not IPloneSEOLayer.providedBy(self.REQUEST):
         return originalListMetaTags(self, context)
-    
     return {}
 
Index: /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/setuphandlers.py
===================================================================
--- /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/setuphandlers.py	(revision 1957)
+++ /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/setuphandlers.py	(revision 1958)
@@ -20,7 +20,8 @@
             logger.log(logging.INFO, "Deleted \"SEO Properties\" action for %s type." % ptype.id)
 
-def removeConfiglet(site, conf_id):
+def removeConfiglet(site):
     """ Remove configlet.
     """
+    conf_id = 'quintagroup.seoptimizer'
     controlpanel_tool = getToolByName(site, 'portal_controlpanel')
     if controlpanel_tool:
@@ -29,5 +30,5 @@
 
 def removeBrowserLayer(site):
-    """ Remove configlet.
+    """ Remove browser layer.
     """
     name="qSEOptimizer"
@@ -46,4 +47,4 @@
     site = context.getSite()
     removeActions(site)
-    removeConfiglet(site, 'quintagroup.seoptimizer')
+    removeConfiglet(site)
     removeBrowserLayer(site)
Index: /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/base.py
===================================================================
--- /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/base.py	(revision 1957)
+++ /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/base.py	(revision 1958)
@@ -19,6 +19,4 @@
     from zope.app.cache.interfaces.ram import IRAMCache
 
-from AccessControl.SecurityManagement import newSecurityManager
-
 from Products.Five import zcml
 from Products.Five import fiveconfigure
@@ -28,13 +26,12 @@
 from Products.CMFCore.utils import getToolByName
 
-from Products.PloneTestCase.layer import onsetup, PloneSite
+from Products.PloneTestCase.layer import PloneSite
 from Products.PloneTestCase import PloneTestCase as ptc
 from Products.PloneTestCase import setup as ptc_setup
 
 from Products.PloneTestCase.PloneTestCase import portal_owner
-from Products.PloneTestCase.PloneTestCase import default_user
 from Products.PloneTestCase.PloneTestCase import default_password
 
-from quintagroup.seoptimizer.config import *
+from quintagroup.seoptimizer.config import PROJECT_NAME
 
 ptc.setupPloneSite()
@@ -49,5 +46,4 @@
         import quintagroup.seoptimizer
         zcml.load_config('configure.zcml', quintagroup.seoptimizer)
-        #zcml.load_config('overrides.zcml', quintagroup.seoptimizer)
         fiveconfigure.debug_mode = False
         ztc.installPackage(PROJECT_NAME)
Index: /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testBugs.py
===================================================================
--- /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testBugs.py	(revision 1957)
+++ /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testBugs.py	(revision 1958)
@@ -1,3 +1,3 @@
-import urllib, re
+import urllib
 from cStringIO import StringIO
 from base import *
Index: /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testCanonicalURL.py
===================================================================
--- /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testCanonicalURL.py	(revision 1957)
+++ /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testCanonicalURL.py	(revision 1958)
@@ -1,16 +1,3 @@
-import re
-from zope.interface import alsoProvides
-from zope.component import queryAdapter
-from zope.component import provideAdapter
-from zope.component import queryMultiAdapter
-from plone.indexer.decorator import indexer
-
-from Products.CMFCore.interfaces import IContentish
-from Products.Archetypes.interfaces import IBaseContent
-
 from quintagroup.canonicalpath.interfaces import ICanonicalLink
-from quintagroup.canonicalpath.adapters import PROPERTY_LINK as CANONICAL_PROPERTY
-from quintagroup.seoptimizer.browser.interfaces import IPloneSEOLayer
-# from quintagroup.seoptimizer.interfaces import ISEOCanonicalPath
 from base import *
 
@@ -26,5 +13,4 @@
         self.curl = re.compile('<link\srel\s*=\s*"canonical"\s+' \
             '[^>]*href\s*=\s*\"([^\"]*)\"[^>]*>', re.S|re.M)
-
 
     def test_CanonicalURL(self):
@@ -90,5 +76,5 @@
         self.assertTrue("wrong canonical url" in html,
                         "Canonical url not validated")
-        
+
     def test_delCanonical(self):
         newcanonical = '/new_canonical'
@@ -104,6 +90,6 @@
         mydoc_canonical = ICanonicalLink(self.mydoc).canonical_link
         self.assertTrue(mydoc_canonical == self.mydoc.absolute_url(),
-            "Steel customized canonical url after remove customization") 
-        
+            "Steel customized canonical url after remove customization")
+
 
 def test_suite():
Index: /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testConfiglet.py
===================================================================
--- /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testConfiglet.py	(revision 1957)
+++ /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testConfiglet.py	(revision 1958)
@@ -1,3 +1,2 @@
-import re
 from base import *
 
Index: /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testContextForm.py
===================================================================
--- /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testContextForm.py	(revision 1957)
+++ /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testContextForm.py	(revision 1958)
@@ -1,3 +1,3 @@
-import urllib, re
+import urllib
 from cStringIO import StringIO
 from base import *
Index: /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testExposeDCMetaTags.py
===================================================================
--- /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testExposeDCMetaTags.py	(revision 1957)
+++ /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testExposeDCMetaTags.py	(revision 1958)
@@ -1,3 +1,3 @@
-import re, string
+import string
 from DateTime import DateTime
 from base import *
@@ -35,5 +35,5 @@
         m = re.match(METATAG % "description", self.html, re.S|re.M)
         self.assert_(m, 'No "description" meta tag when expose DC meta tags is Off')
-        
+
     def test_descriptionInPropertyOn(self):
         self.sp.manage_changeProperties(exposeDCMetaTags = True)
@@ -42,5 +42,5 @@
         m = re.match(METATAG % "description", self.html, re.S|re.M)
         self.assert_(m, 'No "description" meta tag when expose DC meta tags is On')
-        
+
     def test_dateValidRange(self):
         self.sp.manage_changeProperties(exposeDCMetaTags = True)
Index: /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testInstallation.py
===================================================================
--- /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testInstallation.py	(revision 1957)
+++ /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testInstallation.py	(revision 1958)
@@ -5,5 +5,4 @@
 from zope.interface import alsoProvides
 from zope.component import queryMultiAdapter
-from zope.publisher.browser import TestRequest
 from zope.viewlet.interfaces import IViewletManager
 
@@ -11,4 +10,12 @@
 from quintagroup.seoptimizer.browser.interfaces import IPloneSEOLayer
 from base import *
+
+PROPERTY_SHEET = 'seo_properties'
+STOP_WORDS = ['a', 'an', 'amp', 'and', 'are', 'arial', 'as', 'at', 'be', 'but',
+    'by', 'can', 'com', 'do', 'font', 'for', 'from', 'gif', 'had', 'has',
+    'have', 'he', 'helvetica', 'her', 'his', 'how', 'href', 'i', 'if', 'in',
+    'is', 'it', 'javascript', 'jpg', 'made', 'net', 'of', 'on', 'or', 'org',
+    'our', 'sans', 'see', 'serif', 'she', 'that', 'the', 'this', 'to', 'us',
+    'we', 'with', 'you', 'your']
 
 PROPS = {'stop_words': STOP_WORDS,
@@ -31,6 +38,4 @@
 
     def afterSetUp(self):
-        #self.qi = self.portal.portal_quickinstaller
-        #self.qi.uninstallProducts([PROJECT_NAME])
         self.basic_auth = 'mgr:mgrpw'
         self.portal_path = '/%s' % self.portal.absolute_url(1)
@@ -77,5 +82,5 @@
         for p in VIEWLETS:
             self.assert_(manager.get(p) is not None, "Not registered '%s' viewlet" % p)
-        
+
     def test_browser_layer(self):
         from plone.browserlayer import utils
Index: /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testMetaTagsDuplication.py
===================================================================
--- /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testMetaTagsDuplication.py	(revision 1957)
+++ /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testMetaTagsDuplication.py	(revision 1958)
@@ -1,3 +1,2 @@
-import re
 from base import *
 
Index: /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testUsageKeywords.py
===================================================================
--- /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testUsageKeywords.py	(revision 1957)
+++ /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testUsageKeywords.py	(revision 1958)
@@ -1,4 +1,2 @@
-import urllib, re
-from Acquisition import aq_inner
 from base import *
 
@@ -16,10 +14,8 @@
         self.my_doc = self.portal['my_doc']
 
-
     def test_noDefaultKeywords(self):
         """No keywords added for the content by default"""
         metatags = self.pu.listMetaTags(self.my_doc)
         self.assert_('keywords' not in metatags)
-        
 
     def testrender_SEOKeywords(self):
@@ -35,5 +31,4 @@
             self.assert_(re.match(KWSTMPL % expect, html, re.S|re.M),
                          "No '%s' keyword found" % str(seokws))
-
 
     def testbehave_NoSEOKeywordsOnlySubject(self):
Index: /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/test_doctest.py
===================================================================
--- /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/test_doctest.py	(revision 1957)
+++ /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/test_doctest.py	(revision 1958)
@@ -1,7 +1,4 @@
 import unittest
 import doctest
-
-from zope.testing import doctestunit
-from zope.component import testing, eventtesting
 
 from base import *
Index: /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/upgrades.py
===================================================================
--- /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/upgrades.py	(revision 1957)
+++ /quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/upgrades.py	(revision 1958)
@@ -1,5 +1,4 @@
 import logging
 from zope.component import queryMultiAdapter
-from Products.CMFCore.utils import getToolByName
 
 from quintagroup.canonicalpath.interfaces  import ICanonicalLink
@@ -14,5 +13,5 @@
 def changeDomain(plone_tools):
     """ Fix i18n_domain bug for some portal_types,
-    which present in earlier versions of the package.
+        which present in earlier versions of the package.
     """
     types_tool = plone_tools.types()
@@ -44,5 +43,5 @@
 def migrationActions(plone_tools):
     """ Migration actions from portal_types action to seoproperties tool
-    (for seoaction in portal_actions).
+        (for seoaction in portal_actions).
     """
     types_tool = plone_tools.types()
@@ -76,5 +75,5 @@
 
 def removeSkin(plone_tools):
-    """ Remove layers.
+    """ Remove skin layers.
     """
     layer = 'quintagroup.seoptimizer'
