diff --git a/lib/common_helper.rb b/lib/common/common_helper.rb
similarity index 96%
rename from lib/common_helper.rb
rename to lib/common/common_helper.rb
index 29739555..9ed737c6 100644
--- a/lib/common_helper.rb
+++ b/lib/common/common_helper.rb
@@ -17,7 +17,7 @@
# along with this program. If not, see .
#++
-LIB_DIR = File.dirname(__FILE__)
+LIB_DIR = File.expand_path(File.dirname(__FILE__) + '/..')
ROOT_DIR = File.expand_path(LIB_DIR + '/..') # expand_path is used to get "wpscan/" instead of "wpscan/lib/../"
DATA_DIR = ROOT_DIR + '/data'
CONF_DIR = ROOT_DIR + '/conf'
@@ -28,8 +28,8 @@ UPDATER_LIB_DIR = LIB_DIR + '/updater'
COMMON_LIB_DIR = LIB_DIR + '/common'
LOG_FILE = ROOT_DIR + '/log.txt'
# Plugins directories
-COMMON_PLUGINS_DIR = COMMON_LIB_DIR + '/plugins'
-WPSCAN_PLUGINS_DIR = WPSCAN_LIB_DIR + '/plugins'
+COMMON_PLUGINS_DIR = COMMON_LIB_DIR + '/plugins'
+WPSCAN_PLUGINS_DIR = WPSCAN_LIB_DIR + '/plugins' # Not used ATM
WPSTOOLS_PLUGINS_DIR = WPSTOOLS_LIB_DIR + '/plugins'
# Data files
diff --git a/lib/wpscan/wpscan_helper.rb b/lib/wpscan/wpscan_helper.rb
index 081a42f2..2f201c05 100644
--- a/lib/wpscan/wpscan_helper.rb
+++ b/lib/wpscan/wpscan_helper.rb
@@ -17,7 +17,7 @@
# along with this program. If not, see .
#++
-require File.expand_path(File.dirname(__FILE__) + '/../common_helper')
+require File.expand_path(File.dirname(__FILE__) + '/../common/common_helper')
require_files_from_directory(WPSCAN_LIB_DIR + '/modules')
require_files_from_directory(WPSCAN_LIB_DIR, '**/*.rb')
diff --git a/lib/wpstools/wpstools_helper.rb b/lib/wpstools/wpstools_helper.rb
index f45232f8..332854ea 100644
--- a/lib/wpstools/wpstools_helper.rb
+++ b/lib/wpstools/wpstools_helper.rb
@@ -17,7 +17,7 @@
# along with this program. If not, see .
#++
-require File.expand_path(File.dirname(__FILE__) + '/../common_helper')
+require File.expand_path(File.dirname(__FILE__) + '/../common/common_helper')
require_files_from_directory(WPSTOOLS_LIB_DIR)
require_files_from_directory(WPSTOOLS_PLUGINS_DIR, '**/*.rb')
diff --git a/spec/lib/common_helper_spec.rb b/spec/lib/common/common_helper_spec.rb
similarity index 100%
rename from spec/lib/common_helper_spec.rb
rename to spec/lib/common/common_helper_spec.rb
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 9c19a6be..3fb1683f 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -25,7 +25,7 @@ if RUBY_VERSION >= '1.9'
require 'simplecov'
end
-require File.expand_path(File.dirname(__FILE__) + '/../lib/common_helper')
+require File.expand_path(File.dirname(__FILE__) + '/../lib/common/common_helper')
gem 'webmock', '=1.8.11'
require 'webmock/rspec'