You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by fp...@apache.org on 2020/05/13 05:42:50 UTC

[shiro] branch master updated: [SHIRO-679][WIP] Shiro modules have split packages

This is an automated email from the ASF dual-hosted git repository.

fpapon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shiro.git


The following commit(s) were added to refs/heads/master by this push:
     new c4c05e7  [SHIRO-679][WIP] Shiro modules have split packages
     new 323698e  Merge pull request #236 from fpapon/SHIRO-679
c4c05e7 is described below

commit c4c05e73f696b52ddd19d9ce255c4a554e0f98aa
Author: Francois Papon <fp...@apache.org>
AuthorDate: Sun May 10 22:00:56 2020 +0200

    [SHIRO-679][WIP] Shiro modules have split packages
---
 cache/pom.xml                                      |   2 +-
 .../apache/shiro/cache/AbstractCacheManager.java   |   6 +-
 .../org/apache/shiro/cache/CacheException.java     |   2 +-
 .../shiro/cache/MemoryConstrainedCacheManager.java |   2 +-
 config/core/pom.xml                                |   2 +-
 .../shiro/config/ConfigurationException.java       |   2 +-
 .../src/main/java/org/apache/shiro/config/Ini.java |   4 +-
 config/ogdl/pom.xml                                |   6 +-
 .../config/{ => ogdl}/CommonsInterpolator.java     |   2 +-
 .../config/{ => ogdl}/DefaultInterpolator.java     |   2 +-
 .../shiro/config/{ => ogdl}/Interpolator.java      |   2 +-
 .../shiro/config/{ => ogdl}/ReflectionBuilder.java |  33 +++---
 .../UnresolveableReferenceException.java           |   4 +-
 .../shiro/config/{ => ogdl}/event/BeanEvent.java   |   2 +-
 .../{ => ogdl}/event/ConfiguredBeanEvent.java      |   4 +-
 .../{ => ogdl}/event/DestroyedBeanEvent.java       |   4 +-
 .../{ => ogdl}/event/InitializedBeanEvent.java     |   4 +-
 .../{ => ogdl}/event/InstantiatedBeanEvent.java    |   4 +-
 .../{ => ogdl}/event/LoggingBeanEventListener.java |   2 +-
 .../{ => ogdl}/CommonsInterpolatorTest.groovy      |  10 +-
 .../shiro/config/{ => ogdl}/CompositeBean.groovy   |   2 +-
 .../{ => ogdl}/DefaultInterpolatorTest.groovy      |   8 +-
 .../config/{ => ogdl}/InitializableBean.groovy     |   6 +-
 .../config/{ => ogdl}/RecordingBeanListener.groovy |   4 +-
 .../config/{ => ogdl}/ReflectionBuilderTest.groovy | 112 +++++++++++----------
 .../shiro/config/{ => ogdl}/SimpleBean.groovy      |   2 +-
 .../config/{ => ogdl}/SimpleBeanFactory.groovy     |   4 +-
 .../shiro/config/{ => ogdl}/SimpleEnum.groovy      |   2 +-
 .../config/{ => ogdl}/event/BeanEventTest.groovy   |   2 +-
 core/pom.xml                                       |  24 ++++-
 .../shiro/UnavailableSecurityManagerException.java |   2 +
 .../shiro/authc/AuthenticationException.java       |   2 +-
 .../shiro/authc/SaltedAuthenticationInfo.java      |   2 +-
 .../java/org/apache/shiro/authc/SimpleAccount.java |   2 +-
 .../shiro/authc/SimpleAuthenticationInfo.java      |   2 +-
 .../authc/credential/DefaultPasswordService.java   |   2 +-
 .../authc/credential/HashedCredentialsMatcher.java |   6 +-
 .../authc/credential/HashingPasswordService.java   |   2 +-
 .../shiro/authc/credential/PasswordService.java    |   2 +-
 .../authc/credential/SimpleCredentialsMatcher.java |   2 +-
 .../apache/shiro/authz/AuthorizationException.java |   2 +-
 .../shiro/authz/permission/DomainPermission.java   |   2 +-
 .../InvalidPermissionStringException.java          |   2 +-
 .../shiro/authz/permission/WildcardPermission.java |   3 +-
 .../org/apache/shiro/dao/DataAccessException.java  |   2 +-
 .../org/apache/shiro/env/BasicIniEnvironment.java  |   3 +-
 .../org/apache/shiro/env/DefaultEnvironment.java   |   4 +-
 .../org/apache/shiro/env/EnvironmentException.java |   2 +-
 .../shiro/{config => ini}/IniFactorySupport.java   |   8 +-
 .../{config => ini}/IniSecurityManagerFactory.java |  11 +-
 .../org/apache/shiro/jndi/JndiObjectFactory.java   |   2 +-
 .../shiro/mgt/AbstractRememberMeManager.java       |  17 ++--
 .../shiro/mgt/AuthenticatingSecurityManager.java   |   2 +-
 .../shiro/mgt/AuthorizingSecurityManager.java      |   2 +-
 .../apache/shiro/mgt/CachingSecurityManager.java   |   4 +-
 .../org/apache/shiro/mgt/RealmSecurityManager.java |   2 +-
 .../apache/shiro/mgt/SessionsSecurityManager.java  |   2 +-
 .../main/java/org/apache/shiro/package-info.java   |   2 +-
 .../apache/shiro/realm/AuthenticatingRealm.java    |   2 +-
 .../org/apache/shiro/realm/AuthorizingRealm.java   |   4 +-
 .../java/org/apache/shiro/realm/CachingRealm.java  |   2 +-
 .../org/apache/shiro/realm/jdbc/JdbcRealm.java     |   4 +-
 .../apache/shiro/realm/jndi/JndiRealmFactory.java  |   2 +-
 .../realm/ldap/DefaultLdapContextFactory.java      |   2 +-
 .../apache/shiro/realm/ldap/DefaultLdapRealm.java  |   2 +-
 .../shiro/realm/ldap/JndiLdapContextFactory.java   |   2 +-
 .../java/org/apache/shiro/realm/text/IniRealm.java |   2 +-
 .../apache/shiro/realm/text/PropertiesRealm.java   |   6 +-
 .../shiro/realm/text/TextConfigurationRealm.java   |   2 +-
 .../org/apache/shiro/session/SessionException.java |   2 +-
 .../mgt/AbstractValidatingSessionManager.java      |   4 +-
 .../shiro/session/mgt/DefaultSessionContext.java   |   2 +-
 .../apache/shiro/subject/ExecutionException.java   |   2 +-
 .../shiro/subject/SimplePrincipalCollection.java   |   2 +-
 .../java/org/apache/shiro/subject/Subject.java     |   2 +-
 .../subject/support/DefaultSubjectContext.java     |   2 +-
 .../shiro/subject/support/DelegatingSubject.java   |   2 +-
 .../org/apache/shiro/util/AbstractFactory.java     |   2 +
 .../java/org/apache/shiro/util/AntPathMatcher.java |   2 +
 .../java/org/apache/shiro/util/PatternMatcher.java |   2 +-
 .../org/apache/shiro/util/PermissionUtils.java     |   1 +
 .../config/IniSecurityManagerFactoryTest.groovy    |   1 +
 .../event/LoggingBeanEventListenerTest.groovy      |   2 +-
 .../apache/shiro/{ => lang}/codec/H64Test.groovy   |   2 +-
 .../AuthenticatingRealmIntegrationTest.groovy      |   2 +-
 .../test/java/org/apache/shiro/ExceptionTest.java  |   2 +-
 .../AbstractHashedCredentialsMatcherTest.java      |   2 +-
 .../credential/HashedCredentialsMatcherTest.java   |   2 +-
 .../{ => lang}/io/SerializationExceptionTest.java  |   2 +-
 .../org/apache/shiro/realm/jdbc/JDBCRealmTest.java |   6 +-
 .../shiro/subject/DelegatingSubjectTest.java       |   5 +-
 .../org/apache/shiro/test/AbstractShiroTest.java   |   2 +-
 .../shiro/test/ExampleShiroIntegrationTest.java    |   4 +-
 .../shiro/test/SecurityManagerTestSupport.java     |   2 +-
 .../org/apache/shiro/util/StringUtilsTest.java     |   2 +
 crypto/cipher/pom.xml                              |   5 +-
 .../AbstractSymmetricCipherService.java            |   2 +-
 .../crypto/{ => cipher}/AesCipherService.java      |   2 +-
 .../crypto/{ => cipher}/BlowfishCipherService.java |   2 +-
 .../shiro/crypto/{ => cipher}/CipherService.java   |   5 +-
 .../{ => cipher}/DefaultBlockCipherService.java    |   8 +-
 .../crypto/{ => cipher}/JcaCipherService.java      |   7 +-
 .../shiro/crypto/{ => cipher}/OperationMode.java   |   2 +-
 .../shiro/crypto/{ => cipher}/PaddingScheme.java   |   2 +-
 .../shiro/crypto/{ => cipher}/package-info.java    |   4 +-
 .../{ => cipher}/AesCipherServiceTest.groovy       |   7 +-
 .../{ => cipher}/BlowfishCipherServiceTest.groovy  |   8 +-
 .../{ => cipher}/JcaCipherServiceTest.groovy       |   4 +-
 crypto/core/pom.xml                                |   2 +-
 .../org/apache/shiro/crypto/CryptoException.java   |   2 +-
 .../apache/shiro/crypto/RandomNumberGenerator.java |   6 +-
 .../shiro/crypto/SecureRandomNumberGenerator.java  |   2 +-
 .../crypto/SecureRandomNumberGeneratorTest.groovy  |   2 +-
 crypto/hash/pom.xml                                |   3 +-
 .../org/apache/shiro/crypto/hash/AbstractHash.java |  10 +-
 .../shiro/crypto/hash/ConfigurableHashService.java |   2 +-
 .../shiro/crypto/hash/DefaultHashService.java      |   2 +-
 .../java/org/apache/shiro/crypto/hash/Hash.java    |   2 +-
 .../org/apache/shiro/crypto/hash/HashRequest.java  |   2 +-
 .../java/org/apache/shiro/crypto/hash/Md2Hash.java |   4 +-
 .../java/org/apache/shiro/crypto/hash/Md5Hash.java |   4 +-
 .../org/apache/shiro/crypto/hash/Sha1Hash.java     |   4 +-
 .../org/apache/shiro/crypto/hash/Sha256Hash.java   |   4 +-
 .../org/apache/shiro/crypto/hash/Sha384Hash.java   |   4 +-
 .../org/apache/shiro/crypto/hash/Sha512Hash.java   |   4 +-
 .../org/apache/shiro/crypto/hash/SimpleHash.java   |  16 +--
 .../shiro/crypto/hash/SimpleHashRequest.java       |   2 +-
 .../hash/format/DefaultHashFormatFactory.java      |   6 +-
 .../crypto/hash/format/Shiro1CryptFormat.java      |   6 +-
 .../crypto/hash/DefaultHashServiceTest.groovy      |   2 +-
 .../crypto/hash/HashRequestBuilderTest.groovy      |   2 +-
 event/pom.xml                                      |   2 +-
 .../support/AnnotationEventListenerResolver.java   |   2 +-
 .../samples/guice/SampleShiroServletModule.java    |   2 +-
 .../samples/guice/SampleShiroServletModule.java    |   2 +-
 .../shiro/testing/web/AbstractContainerIT.java     |   2 +-
 lang/pom.xml                                       |   3 +-
 .../apache/shiro/{ => lang}/ShiroException.java    |   2 +-
 .../org/apache/shiro/{ => lang}/codec/Base64.java  |   2 +-
 .../shiro/{ => lang}/codec/CodecException.java     |   4 +-
 .../shiro/{ => lang}/codec/CodecSupport.java       |   4 +-
 .../org/apache/shiro/{ => lang}/codec/H64.java     |   2 +-
 .../org/apache/shiro/{ => lang}/codec/Hex.java     |   2 +-
 .../shiro/{ => lang}/codec/package-info.java       |   2 +-
 .../io/ClassResolvingObjectInputStream.java        |   6 +-
 .../shiro/{ => lang}/io/DefaultSerializer.java     |   2 +-
 .../apache/shiro/{ => lang}/io/ResourceUtils.java  |   4 +-
 .../{ => lang}/io/SerializationException.java      |   4 +-
 .../org/apache/shiro/{ => lang}/io/Serializer.java |   4 +-
 .../apache/shiro/{ => lang}/io/XmlSerializer.java  |   2 +-
 .../apache/shiro/{ => lang}/io/package-info.java   |   2 +-
 .../org/apache/shiro/{ => lang}/util/Assert.java   |   2 +-
 .../apache/shiro/{ => lang}/util/ByteSource.java   |   2 +-
 .../apache/shiro/{ => lang}/util/ClassUtils.java   |   2 +-
 .../apache/shiro/{ => lang}/util/Destroyable.java  |   2 +-
 .../org/apache/shiro/{ => lang}/util/Factory.java  |   2 +-
 .../shiro/{ => lang}/util/Initializable.java       |   6 +-
 .../{ => lang}/util/InstantiationException.java    |   4 +-
 .../shiro/{ => lang}/util/LifecycleUtils.java      |   8 +-
 .../org/apache/shiro/{ => lang}/util/Nameable.java |   2 +-
 .../shiro/{ => lang}/util/SimpleByteSource.java    |   8 +-
 .../apache/shiro/{ => lang}/util/SoftHashMap.java  |   2 +-
 .../apache/shiro/{ => lang}/util/StringUtils.java  |   2 +-
 .../{ => lang}/util/UnknownClassException.java     |   4 +-
 pom.xml                                            |   4 +-
 .../aspectj/bank/SecureBankServiceTest.java        |   4 +-
 .../SampleShiroNativeSessionsServletModule.java    |   2 +-
 .../samples/guice/SampleShiroServletModule.java    |   3 +-
 samples/quickstart/src/main/java/Quickstart.java   |   4 +-
 .../src/main/webapp/WEB-INF/shiro.ini              |   2 +-
 .../java/org/apache/shiro/samples/QuickStart.java  |   2 +-
 .../samples/sprhib/web/EditUserValidator.java      |   2 +-
 .../shiro/samples/sprhib/web/SignupValidator.java  |   2 +-
 .../samples/spring/realm/SaltAwareJdbcRealm.java   |   2 +-
 .../apache/shiro/samples/spring/QuickStart.java    |   2 +-
 samples/web/src/main/webapp/WEB-INF/shiro.ini      |   2 +-
 .../org/apache/shiro/aspectj/DummyServiceTest.java |   4 +-
 support/ehcache/pom.xml                            |   2 +-
 .../apache/shiro/cache/ehcache/EhCacheManager.java |  10 +-
 .../shiro/cache/ehcache/EhCacheManagerTest.java    |   2 +-
 support/features/src/main/resources/features.xml   |  24 +++--
 .../shiro/guice/DestroyableInjectionListener.java  |   4 +-
 .../guice/InitializableInjectionListener.java      |   4 +-
 .../apache/shiro/guice/LifecycleTypeListener.java  |   4 +-
 .../java/org/apache/shiro/guice/ShiroModule.java   |   6 +-
 .../org/apache/shiro/guice/web/ShiroWebModule.java |   2 +-
 .../apache/shiro/guice/BeanTypeListenerTest.java   |   2 +-
 .../guice/DestroyableInjectionListenerTest.java    |   2 +-
 .../guice/InitializableInjectionListenerTest.java  |   2 +-
 .../shiro/guice/LifecycleTypeListenerTest.java     |   6 +-
 .../org/apache/shiro/guice/ShiroModuleTest.java    |   6 +-
 support/hazelcast/pom.xml                          |   2 +-
 .../hazelcast/cache/HazelcastCacheManager.java     |   6 +-
 .../shiro/spring/LifecycleBeanPostProcessor.java   |  12 +--
 .../spring/ShiroEventBusBeanPostProcessor.java     |   2 +-
 .../shiro/spring/web/ShiroFilterFactoryBean.java   |   4 +-
 .../java/org/apache/shiro/tools/hasher/Hasher.java |  10 +-
 .../web/config/IniFilterChainResolverFactory.java  |   8 +-
 .../web/config/WebIniSecurityManagerFactory.java   |   2 +-
 .../apache/shiro/web/env/EnvironmentLoader.java    |   8 +-
 .../apache/shiro/web/env/IniWebEnvironment.java    |  12 ++-
 .../shiro/web/env/ResourceBasedWebEnvironment.java |   2 +-
 .../shiro/web/filter/PathMatchingFilter.java       |   3 +-
 .../authc/BasicHttpAuthenticationFilter.java       |   7 +-
 .../shiro/web/filter/authc/LogoutFilter.java       |   3 -
 .../web/filter/authz/AuthorizationFilter.java      |   2 +-
 .../apache/shiro/web/filter/authz/HostFilter.java  |   2 +-
 .../filter/authz/HttpMethodPermissionFilter.java   |   2 +-
 .../apache/shiro/web/filter/authz/IpFilter.java    |   6 +-
 .../apache/shiro/web/filter/authz/PortFilter.java  |   2 +-
 .../apache/shiro/web/filter/mgt/DefaultFilter.java |   2 +-
 .../web/filter/mgt/DefaultFilterChainManager.java  |   4 +-
 .../shiro/web/filter/mgt/FilterChainManager.java   |   4 +-
 .../mgt/PathMatchingFilterChainResolver.java       |   9 +-
 .../web/filter/mgt/SimpleNamedFilterList.java      |   2 +-
 .../shiro/web/mgt/CookieRememberMeManager.java     |   2 +-
 .../shiro/web/mgt/DefaultWebSecurityManager.java   |   2 +-
 .../apache/shiro/web/servlet/AbstractFilter.java   |   2 +-
 .../apache/shiro/web/servlet/IniShiroFilter.java   |   6 +-
 .../apache/shiro/web/servlet/NameableFilter.java   |   2 +-
 .../org/apache/shiro/web/servlet/SimpleCookie.java |   2 +-
 .../shiro/web/session/HttpServletSession.java      |   2 +-
 .../web/subject/support/WebDelegatingSubject.java  |   2 +-
 .../java/org/apache/shiro/web/util/WebUtils.java   |   2 +-
 .../shiro/web/env/IniWebEnvironmentTest.groovy     |  10 +-
 .../shiro/web/servlet/IniShiroFilterTest.groovy    |   2 +-
 .../config/WebIniSecurityManagerFactoryTest.java   |   2 +-
 .../authc/BasicHttpFilterAuthenticationTest.java   |   2 +-
 .../mgt/PathMatchingFilterChainResolverTest.java   |   1 -
 .../shiro/web/mgt/CookieRememberMeManagerTest.java |   2 +-
 230 files changed, 508 insertions(+), 464 deletions(-)

diff --git a/cache/pom.xml b/cache/pom.xml
index bed6d4e..6672317 100644
--- a/cache/pom.xml
+++ b/cache/pom.xml
@@ -42,7 +42,7 @@
                         <Bundle-SymbolicName>org.apache.shiro.cache</Bundle-SymbolicName>
                         <Export-Package>org.apache.shiro.cache*;version=${project.version}</Export-Package>
                         <Import-Package>
-                            org.apache.shiro*;version="${shiro.osgi.importRange}",
+                            org.apache.shiro.lang*;version="${shiro.osgi.importRange}",
                             *
                         </Import-Package>
                     </instructions>
diff --git a/cache/src/main/java/org/apache/shiro/cache/AbstractCacheManager.java b/cache/src/main/java/org/apache/shiro/cache/AbstractCacheManager.java
index d5f08e5..3c2d6b3 100644
--- a/cache/src/main/java/org/apache/shiro/cache/AbstractCacheManager.java
+++ b/cache/src/main/java/org/apache/shiro/cache/AbstractCacheManager.java
@@ -18,9 +18,9 @@
  */
 package org.apache.shiro.cache;
 
-import org.apache.shiro.util.Destroyable;
-import org.apache.shiro.util.LifecycleUtils;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.Destroyable;
+import org.apache.shiro.lang.util.LifecycleUtils;
+import org.apache.shiro.lang.util.StringUtils;
 
 import java.util.Collection;
 import java.util.concurrent.ConcurrentHashMap;
diff --git a/cache/src/main/java/org/apache/shiro/cache/CacheException.java b/cache/src/main/java/org/apache/shiro/cache/CacheException.java
index a798702..e998dfe 100644
--- a/cache/src/main/java/org/apache/shiro/cache/CacheException.java
+++ b/cache/src/main/java/org/apache/shiro/cache/CacheException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.cache;
 
-import org.apache.shiro.ShiroException;
+import org.apache.shiro.lang.ShiroException;
 
 
 /**
diff --git a/cache/src/main/java/org/apache/shiro/cache/MemoryConstrainedCacheManager.java b/cache/src/main/java/org/apache/shiro/cache/MemoryConstrainedCacheManager.java
index 9b331e4..3f0ee56 100644
--- a/cache/src/main/java/org/apache/shiro/cache/MemoryConstrainedCacheManager.java
+++ b/cache/src/main/java/org/apache/shiro/cache/MemoryConstrainedCacheManager.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.cache;
 
-import org.apache.shiro.util.SoftHashMap;
+import org.apache.shiro.lang.util.SoftHashMap;
 
 /**
  * Simple memory-only based {@link CacheManager CacheManager} implementation usable in production
diff --git a/config/core/pom.xml b/config/core/pom.xml
index faa8716..078e393 100644
--- a/config/core/pom.xml
+++ b/config/core/pom.xml
@@ -43,7 +43,7 @@
                         <Bundle-SymbolicName>org.apache.shiro.config.core</Bundle-SymbolicName>
                         <Export-Package>org.apache.shiro.config*;version=${project.version}</Export-Package>
                         <Import-Package>
-                            org.apache.shiro*;version="${shiro.osgi.importRange}",
+                            org.apache.shiro.lang*;version="${shiro.osgi.importRange}",
                             *
                         </Import-Package>
                     </instructions>
diff --git a/config/core/src/main/java/org/apache/shiro/config/ConfigurationException.java b/config/core/src/main/java/org/apache/shiro/config/ConfigurationException.java
index 34b5def..2ae352b 100644
--- a/config/core/src/main/java/org/apache/shiro/config/ConfigurationException.java
+++ b/config/core/src/main/java/org/apache/shiro/config/ConfigurationException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.config;
 
-import org.apache.shiro.ShiroException;
+import org.apache.shiro.lang.ShiroException;
 
 
 /**
diff --git a/config/core/src/main/java/org/apache/shiro/config/Ini.java b/config/core/src/main/java/org/apache/shiro/config/Ini.java
index 7993619..1f7c48d 100644
--- a/config/core/src/main/java/org/apache/shiro/config/Ini.java
+++ b/config/core/src/main/java/org/apache/shiro/config/Ini.java
@@ -18,8 +18,8 @@
  */
 package org.apache.shiro.config;
 
-import org.apache.shiro.io.ResourceUtils;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.io.ResourceUtils;
+import org.apache.shiro.lang.util.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/config/ogdl/pom.xml b/config/ogdl/pom.xml
index aa05dff..843a568 100644
--- a/config/ogdl/pom.xml
+++ b/config/ogdl/pom.xml
@@ -54,9 +54,11 @@
                 <configuration>
                     <instructions>
                         <Bundle-SymbolicName>org.apache.shiro.config.ogdl</Bundle-SymbolicName>
-                        <Export-Package>org.apache.shiro.config*;version=${project.version}</Export-Package>
+                        <Export-Package>org.apache.shiro.config.ogdl.*;version=${project.version}</Export-Package>
                         <Import-Package>
-                            org.apache.shiro*;version="${shiro.osgi.importRange}",
+                            org.apache.shiro.lang*;version="${shiro.osgi.importRange}",
+                            org.apache.shiro.config*;version="${shiro.osgi.importRange}",
+                            org.apache.shiro.event*;version="${shiro.osgi.importRange}",
                             *
                         </Import-Package>
                     </instructions>
diff --git a/config/ogdl/src/main/java/org/apache/shiro/config/CommonsInterpolator.java b/config/ogdl/src/main/java/org/apache/shiro/config/ogdl/CommonsInterpolator.java
similarity index 98%
rename from config/ogdl/src/main/java/org/apache/shiro/config/CommonsInterpolator.java
rename to config/ogdl/src/main/java/org/apache/shiro/config/ogdl/CommonsInterpolator.java
index 03b472c..15bff99 100644
--- a/config/ogdl/src/main/java/org/apache/shiro/config/CommonsInterpolator.java
+++ b/config/ogdl/src/main/java/org/apache/shiro/config/ogdl/CommonsInterpolator.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config;
+package org.apache.shiro.config.ogdl;
 
 import org.apache.commons.configuration2.interpol.ConfigurationInterpolator;
 import org.apache.commons.configuration2.interpol.ConstantLookup;
diff --git a/config/ogdl/src/main/java/org/apache/shiro/config/DefaultInterpolator.java b/config/ogdl/src/main/java/org/apache/shiro/config/ogdl/DefaultInterpolator.java
similarity index 97%
rename from config/ogdl/src/main/java/org/apache/shiro/config/DefaultInterpolator.java
rename to config/ogdl/src/main/java/org/apache/shiro/config/ogdl/DefaultInterpolator.java
index 8addd2f..a6f189d 100644
--- a/config/ogdl/src/main/java/org/apache/shiro/config/DefaultInterpolator.java
+++ b/config/ogdl/src/main/java/org/apache/shiro/config/ogdl/DefaultInterpolator.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config;
+package org.apache.shiro.config.ogdl;
 
 /**
  * This {@link Interpolator} simply returns the original value.  This is implementation is useful when interpolation
diff --git a/config/ogdl/src/main/java/org/apache/shiro/config/Interpolator.java b/config/ogdl/src/main/java/org/apache/shiro/config/ogdl/Interpolator.java
similarity index 97%
rename from config/ogdl/src/main/java/org/apache/shiro/config/Interpolator.java
rename to config/ogdl/src/main/java/org/apache/shiro/config/ogdl/Interpolator.java
index 0de933e..879e61f 100644
--- a/config/ogdl/src/main/java/org/apache/shiro/config/Interpolator.java
+++ b/config/ogdl/src/main/java/org/apache/shiro/config/ogdl/Interpolator.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config;
+package org.apache.shiro.config.ogdl;
 
 /**
  * Basic String interpolation interface.  Typically implementations will use the Maven/Ant like notation: ${key}, but
diff --git a/config/ogdl/src/main/java/org/apache/shiro/config/ReflectionBuilder.java b/config/ogdl/src/main/java/org/apache/shiro/config/ogdl/ReflectionBuilder.java
similarity index 97%
rename from config/ogdl/src/main/java/org/apache/shiro/config/ReflectionBuilder.java
rename to config/ogdl/src/main/java/org/apache/shiro/config/ogdl/ReflectionBuilder.java
index e88e543..77a1db6 100644
--- a/config/ogdl/src/main/java/org/apache/shiro/config/ReflectionBuilder.java
+++ b/config/ogdl/src/main/java/org/apache/shiro/config/ogdl/ReflectionBuilder.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config;
+package org.apache.shiro.config.ogdl;
 
 import java.beans.PropertyDescriptor;
 import java.util.ArrayList;
@@ -31,24 +31,25 @@ import java.util.Set;
 import org.apache.commons.beanutils.BeanUtilsBean;
 import org.apache.commons.beanutils.ConvertUtilsBean;
 import org.apache.commons.beanutils.SuppressPropertiesBeanIntrospector;
-import org.apache.shiro.codec.Base64;
-import org.apache.shiro.codec.Hex;
-import org.apache.shiro.config.event.BeanEvent;
-import org.apache.shiro.config.event.ConfiguredBeanEvent;
-import org.apache.shiro.config.event.DestroyedBeanEvent;
-import org.apache.shiro.config.event.InitializedBeanEvent;
-import org.apache.shiro.config.event.InstantiatedBeanEvent;
+import org.apache.shiro.lang.codec.Base64;
+import org.apache.shiro.lang.codec.Hex;
+import org.apache.shiro.config.ConfigurationException;
+import org.apache.shiro.config.ogdl.event.BeanEvent;
+import org.apache.shiro.config.ogdl.event.ConfiguredBeanEvent;
+import org.apache.shiro.config.ogdl.event.DestroyedBeanEvent;
+import org.apache.shiro.config.ogdl.event.InitializedBeanEvent;
+import org.apache.shiro.config.ogdl.event.InstantiatedBeanEvent;
 import org.apache.shiro.event.EventBus;
 import org.apache.shiro.event.EventBusAware;
 import org.apache.shiro.event.Subscribe;
 import org.apache.shiro.event.support.DefaultEventBus;
-import org.apache.shiro.util.Assert;
-import org.apache.shiro.util.ByteSource;
-import org.apache.shiro.util.ClassUtils;
-import org.apache.shiro.util.Factory;
-import org.apache.shiro.util.LifecycleUtils;
-import org.apache.shiro.util.Nameable;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.Assert;
+import org.apache.shiro.lang.util.ByteSource;
+import org.apache.shiro.lang.util.ClassUtils;
+import org.apache.shiro.lang.util.Factory;
+import org.apache.shiro.lang.util.LifecycleUtils;
+import org.apache.shiro.lang.util.Nameable;
+import org.apache.shiro.lang.util.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -59,7 +60,7 @@ import org.slf4j.LoggerFactory;
  * to construct or modify the SecurityManager, its dependencies, and web-based security filters.
  * <p/>
  * Recognizes {@link Factory} implementations and will call
- * {@link org.apache.shiro.util.Factory#getInstance() getInstance} to satisfy any reference to this bean.
+ * {@link org.apache.shiro.lang.util.Factory#getInstance() getInstance} to satisfy any reference to this bean.
  *
  * @since 0.9
  */
diff --git a/config/ogdl/src/main/java/org/apache/shiro/config/UnresolveableReferenceException.java b/config/ogdl/src/main/java/org/apache/shiro/config/ogdl/UnresolveableReferenceException.java
similarity index 95%
rename from config/ogdl/src/main/java/org/apache/shiro/config/UnresolveableReferenceException.java
rename to config/ogdl/src/main/java/org/apache/shiro/config/ogdl/UnresolveableReferenceException.java
index ac6d90d..18b0b4b 100644
--- a/config/ogdl/src/main/java/org/apache/shiro/config/UnresolveableReferenceException.java
+++ b/config/ogdl/src/main/java/org/apache/shiro/config/ogdl/UnresolveableReferenceException.java
@@ -16,7 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config;
+package org.apache.shiro.config.ogdl;
+
+import org.apache.shiro.config.ConfigurationException;
 
 /**
  * Exception thrown when a reference to an object is made, but that object cannot be found.  This is most likely
diff --git a/config/ogdl/src/main/java/org/apache/shiro/config/event/BeanEvent.java b/config/ogdl/src/main/java/org/apache/shiro/config/ogdl/event/BeanEvent.java
similarity index 97%
rename from config/ogdl/src/main/java/org/apache/shiro/config/event/BeanEvent.java
rename to config/ogdl/src/main/java/org/apache/shiro/config/ogdl/event/BeanEvent.java
index 7c3c967..6ecfcfa 100644
--- a/config/ogdl/src/main/java/org/apache/shiro/config/event/BeanEvent.java
+++ b/config/ogdl/src/main/java/org/apache/shiro/config/ogdl/event/BeanEvent.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config.event;
+package org.apache.shiro.config.ogdl.event;
 
 import org.apache.shiro.event.Event;
 
diff --git a/config/ogdl/src/main/java/org/apache/shiro/config/event/ConfiguredBeanEvent.java b/config/ogdl/src/main/java/org/apache/shiro/config/ogdl/event/ConfiguredBeanEvent.java
similarity index 92%
rename from config/ogdl/src/main/java/org/apache/shiro/config/event/ConfiguredBeanEvent.java
rename to config/ogdl/src/main/java/org/apache/shiro/config/ogdl/event/ConfiguredBeanEvent.java
index 24dccee..2a196a5 100644
--- a/config/ogdl/src/main/java/org/apache/shiro/config/event/ConfiguredBeanEvent.java
+++ b/config/ogdl/src/main/java/org/apache/shiro/config/ogdl/event/ConfiguredBeanEvent.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config.event;
+package org.apache.shiro.config.ogdl.event;
 
 import java.util.Map;
 
@@ -26,7 +26,7 @@ import java.util.Map;
  *
  * @since 1.3
  * @see InstantiatedBeanEvent
- * @see org.apache.shiro.util.Initializable Initializable
+ * @see org.apache.shiro.lang.util.Initializable Initializable
  * @see InitializedBeanEvent
  * @see DestroyedBeanEvent
  */
diff --git a/config/ogdl/src/main/java/org/apache/shiro/config/event/DestroyedBeanEvent.java b/config/ogdl/src/main/java/org/apache/shiro/config/ogdl/event/DestroyedBeanEvent.java
similarity index 92%
rename from config/ogdl/src/main/java/org/apache/shiro/config/event/DestroyedBeanEvent.java
rename to config/ogdl/src/main/java/org/apache/shiro/config/ogdl/event/DestroyedBeanEvent.java
index d040e6b..f4924cb 100644
--- a/config/ogdl/src/main/java/org/apache/shiro/config/event/DestroyedBeanEvent.java
+++ b/config/ogdl/src/main/java/org/apache/shiro/config/ogdl/event/DestroyedBeanEvent.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config.event;
+package org.apache.shiro.config.ogdl.event;
 
 import java.util.Map;
 
@@ -24,7 +24,7 @@ import java.util.Map;
  * Event triggered when a configured bean has been destroyed.
  *
  * @since 1.3
- * @see org.apache.shiro.util.Destroyable Destroyable
+ * @see org.apache.shiro.lang.util.Destroyable Destroyable
  * @see InstantiatedBeanEvent
  * @see ConfiguredBeanEvent
  * @see InitializedBeanEvent
diff --git a/config/ogdl/src/main/java/org/apache/shiro/config/event/InitializedBeanEvent.java b/config/ogdl/src/main/java/org/apache/shiro/config/ogdl/event/InitializedBeanEvent.java
similarity index 92%
rename from config/ogdl/src/main/java/org/apache/shiro/config/event/InitializedBeanEvent.java
rename to config/ogdl/src/main/java/org/apache/shiro/config/ogdl/event/InitializedBeanEvent.java
index 070d548..44a8dfc 100644
--- a/config/ogdl/src/main/java/org/apache/shiro/config/event/InitializedBeanEvent.java
+++ b/config/ogdl/src/main/java/org/apache/shiro/config/ogdl/event/InitializedBeanEvent.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config.event;
+package org.apache.shiro.config.ogdl.event;
 
 import java.util.Map;
 
@@ -24,7 +24,7 @@ import java.util.Map;
  * Event triggered when a configured bean has been instantiated, fully configured and initialized.
  *
  * @since 1.3
- * @see org.apache.shiro.util.Initializable Initializable
+ * @see org.apache.shiro.lang.util.Initializable Initializable
  * @see InstantiatedBeanEvent
  * @see ConfiguredBeanEvent
  * @see DestroyedBeanEvent
diff --git a/config/ogdl/src/main/java/org/apache/shiro/config/event/InstantiatedBeanEvent.java b/config/ogdl/src/main/java/org/apache/shiro/config/ogdl/event/InstantiatedBeanEvent.java
similarity index 92%
rename from config/ogdl/src/main/java/org/apache/shiro/config/event/InstantiatedBeanEvent.java
rename to config/ogdl/src/main/java/org/apache/shiro/config/ogdl/event/InstantiatedBeanEvent.java
index 991217f..b6eec57 100644
--- a/config/ogdl/src/main/java/org/apache/shiro/config/event/InstantiatedBeanEvent.java
+++ b/config/ogdl/src/main/java/org/apache/shiro/config/ogdl/event/InstantiatedBeanEvent.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config.event;
+package org.apache.shiro.config.ogdl.event;
 
 import java.util.Map;
 
@@ -27,7 +27,7 @@ import java.util.Map;
  * @see ConfiguredBeanEvent
  * @see InitializedBeanEvent
  * @see DestroyedBeanEvent
- * @see org.apache.shiro.util.Initializable Initializable
+ * @see org.apache.shiro.lang.util.Initializable Initializable
  */
 public class InstantiatedBeanEvent extends BeanEvent {
 
diff --git a/config/ogdl/src/main/java/org/apache/shiro/config/event/LoggingBeanEventListener.java b/config/ogdl/src/main/java/org/apache/shiro/config/ogdl/event/LoggingBeanEventListener.java
similarity index 97%
rename from config/ogdl/src/main/java/org/apache/shiro/config/event/LoggingBeanEventListener.java
rename to config/ogdl/src/main/java/org/apache/shiro/config/ogdl/event/LoggingBeanEventListener.java
index f6837e2..24c7099 100644
--- a/config/ogdl/src/main/java/org/apache/shiro/config/event/LoggingBeanEventListener.java
+++ b/config/ogdl/src/main/java/org/apache/shiro/config/ogdl/event/LoggingBeanEventListener.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config.event;
+package org.apache.shiro.config.ogdl.event;
 
 import org.apache.shiro.event.Subscribe;
 import org.slf4j.Logger;
diff --git a/config/ogdl/src/test/groovy/org/apache/shiro/config/CommonsInterpolatorTest.groovy b/config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/CommonsInterpolatorTest.groovy
similarity index 81%
rename from config/ogdl/src/test/groovy/org/apache/shiro/config/CommonsInterpolatorTest.groovy
rename to config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/CommonsInterpolatorTest.groovy
index 851aeb0..9f91e37 100644
--- a/config/ogdl/src/test/groovy/org/apache/shiro/config/CommonsInterpolatorTest.groovy
+++ b/config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/CommonsInterpolatorTest.groovy
@@ -16,14 +16,16 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config
+package org.apache.shiro.config.ogdl
 
+import org.apache.shiro.config.ogdl.CommonsInterpolator
 import org.junit.Test
 
-import static org.junit.Assert.*
+import static org.junit.Assert.assertEquals
+import static org.junit.Assert.assertNull
 
 /**
- * Tests for {@link CommonsInterpolator}.
+ * Tests for {@link org.apache.shiro.config.ogdl.CommonsInterpolator}.
  * @since 1.4
  */
 class CommonsInterpolatorTest {
@@ -41,7 +43,7 @@ class CommonsInterpolatorTest {
         def sourceString = """
             \${os.name}
             \${foobar}
-            \${const:org.apache.shiro.config.CommonsInterpolatorTest.TEST_ME}
+            \${const:org.apache.shiro.config.ogdl.CommonsInterpolatorTest.TEST_ME}
             Some other text
         """
 
diff --git a/config/ogdl/src/test/groovy/org/apache/shiro/config/CompositeBean.groovy b/config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/CompositeBean.groovy
similarity index 97%
rename from config/ogdl/src/test/groovy/org/apache/shiro/config/CompositeBean.groovy
rename to config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/CompositeBean.groovy
index 882ef90..ff4d5bb 100644
--- a/config/ogdl/src/test/groovy/org/apache/shiro/config/CompositeBean.groovy
+++ b/config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/CompositeBean.groovy
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config
+package org.apache.shiro.config.ogdl
 
 class CompositeBean {
 
diff --git a/config/ogdl/src/test/groovy/org/apache/shiro/config/DefaultInterpolatorTest.groovy b/config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/DefaultInterpolatorTest.groovy
similarity index 83%
rename from config/ogdl/src/test/groovy/org/apache/shiro/config/DefaultInterpolatorTest.groovy
rename to config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/DefaultInterpolatorTest.groovy
index 4456068..2a83fe7 100644
--- a/config/ogdl/src/test/groovy/org/apache/shiro/config/DefaultInterpolatorTest.groovy
+++ b/config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/DefaultInterpolatorTest.groovy
@@ -16,14 +16,16 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config
+package org.apache.shiro.config.ogdl
 
+import org.apache.shiro.config.ogdl.DefaultInterpolator
 import org.junit.Test
 
-import static org.junit.Assert.*
+import static org.junit.Assert.assertNull
+import static org.junit.Assert.assertSame
 
 /**
- * Tests for {@link DefaultInterpolator}.
+ * Tests for {@link org.apache.shiro.config.ogdl.DefaultInterpolator}.
  * @since 1.4
  */
 public class DefaultInterpolatorTest {
diff --git a/config/ogdl/src/test/groovy/org/apache/shiro/config/InitializableBean.groovy b/config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/InitializableBean.groovy
similarity index 89%
rename from config/ogdl/src/test/groovy/org/apache/shiro/config/InitializableBean.groovy
rename to config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/InitializableBean.groovy
index a90d82d..05b35f0 100644
--- a/config/ogdl/src/test/groovy/org/apache/shiro/config/InitializableBean.groovy
+++ b/config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/InitializableBean.groovy
@@ -16,10 +16,10 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config;
+package org.apache.shiro.config.ogdl;
 
-import org.apache.shiro.ShiroException;
-import org.apache.shiro.util.Initializable;
+import org.apache.shiro.lang.ShiroException;
+import org.apache.shiro.lang.util.Initializable;
 
 /**
  * @since 1.2.2
diff --git a/config/ogdl/src/test/groovy/org/apache/shiro/config/RecordingBeanListener.groovy b/config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/RecordingBeanListener.groovy
similarity index 97%
rename from config/ogdl/src/test/groovy/org/apache/shiro/config/RecordingBeanListener.groovy
rename to config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/RecordingBeanListener.groovy
index ee9d7b3..afb4aa6 100644
--- a/config/ogdl/src/test/groovy/org/apache/shiro/config/RecordingBeanListener.groovy
+++ b/config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/RecordingBeanListener.groovy
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config
+package org.apache.shiro.config.ogdl
 
-import org.apache.shiro.config.event.*
+import org.apache.shiro.config.ogdl.event.*
 import org.apache.shiro.event.Subscribe
 
 /**
diff --git a/config/ogdl/src/test/groovy/org/apache/shiro/config/ReflectionBuilderTest.groovy b/config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/ReflectionBuilderTest.groovy
similarity index 86%
rename from config/ogdl/src/test/groovy/org/apache/shiro/config/ReflectionBuilderTest.groovy
rename to config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/ReflectionBuilderTest.groovy
index 500fb34..5fd0950 100644
--- a/config/ogdl/src/test/groovy/org/apache/shiro/config/ReflectionBuilderTest.groovy
+++ b/config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/ReflectionBuilderTest.groovy
@@ -16,19 +16,21 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config
-
-import org.apache.shiro.codec.Base64
-import org.apache.shiro.codec.CodecSupport
-import org.apache.shiro.codec.Hex
-import org.apache.shiro.config.event.BeanEvent
+package org.apache.shiro.config.ogdl
+
+import org.apache.shiro.lang.codec.Base64
+import org.apache.shiro.lang.codec.CodecSupport
+import org.apache.shiro.lang.codec.Hex
+import org.apache.shiro.config.ConfigurationException
+import org.apache.shiro.config.Ini
+import org.apache.shiro.config.ogdl.event.BeanEvent
 import org.junit.Test
 
 import static org.junit.Assert.*
 import static org.hamcrest.Matchers.*
 
 /**
- * Unit tests for the {@link ReflectionBuilder} implementation.
+ * Unit tests for the {@link org.apache.shiro.config.ogdl.ReflectionBuilder} implementation.
  */
 @SuppressWarnings("GrMethodMayBeStatic")
 class ReflectionBuilderTest {
@@ -93,7 +95,7 @@ class ReflectionBuilderTest {
     void testNestedMapAssignmentWithPeriodDelimitedKeys() {
         def ini = new Ini()
         ini.load('''
-            simpleBean = org.apache.shiro.config.SimpleBean
+            simpleBean = org.apache.shiro.config.ogdl.SimpleBean
             simpleBean.mapProp[java.naming.security.protocol] = ssl
             simpleBean.mapProp[com.sun.jndi.ldap.connect.pool] = true
             simpleBean.mapProp[com.sun.jndi.ldap.connect.pool.protocol] = plain ssl
@@ -111,7 +113,7 @@ class ReflectionBuilderTest {
     @Test
     void testSimpleConfig() {
         Map<String, String> defs = new LinkedHashMap<String, String>();
-        defs.put("compositeBean", "org.apache.shiro.config.CompositeBean");
+        defs.put("compositeBean", "org.apache.shiro.config.ogdl.CompositeBean");
         defs.put("compositeBean.stringProp", "blah");
         defs.put("compositeBean.booleanProp", "true");
         defs.put("compositeBean.intProp", "42");
@@ -153,7 +155,7 @@ class ReflectionBuilderTest {
     @Test
     void testWithConfiguredNullLiteralValue() {
         Map<String, String> defs = new LinkedHashMap<String, String>();
-        defs.put("compositeBean", "org.apache.shiro.config.CompositeBean");
+        defs.put("compositeBean", "org.apache.shiro.config.ogdl.CompositeBean");
         defs.put("compositeBean.intProp", "42");
         defs.put("compositeBean.booleanProp", "true");
         defs.put("compositeBean.stringProp", "\"null\"");
@@ -171,7 +173,7 @@ class ReflectionBuilderTest {
     @Test
     void testWithConfiguredEmptyStringValue() {
         Map<String, String> defs = new LinkedHashMap<String, String>();
-        defs.put("compositeBean", "org.apache.shiro.config.CompositeBean");
+        defs.put("compositeBean", "org.apache.shiro.config.ogdl.CompositeBean");
         defs.put("compositeBean.intProp", "42");
         defs.put("compositeBean.booleanProp", "true");
         defs.put("compositeBean.stringProp", "\"\"");
@@ -189,7 +191,7 @@ class ReflectionBuilderTest {
     @Test
     void testWithConfiguredEmptyStringLiteralValue() {
         Map<String, String> defs = new LinkedHashMap<String, String>();
-        defs.put("compositeBean", "org.apache.shiro.config.CompositeBean");
+        defs.put("compositeBean", "org.apache.shiro.config.ogdl.CompositeBean");
         defs.put("compositeBean.intProp", "42");
         defs.put("compositeBean.booleanProp", "true");
         defs.put("compositeBean.stringProp", "\"\"\"\"");
@@ -207,7 +209,7 @@ class ReflectionBuilderTest {
     @Test
     void testSimpleConfigWithDollarSignStringValue() {
         Map<String, String> defs = new LinkedHashMap<String, String>();
-        defs.put("compositeBean", "org.apache.shiro.config.CompositeBean");
+        defs.put("compositeBean", "org.apache.shiro.config.ogdl.CompositeBean");
         defs.put("compositeBean.stringProp", '\\$500');
 
         ReflectionBuilder builder = new ReflectionBuilder();
@@ -220,9 +222,9 @@ class ReflectionBuilderTest {
     @Test
     void testObjectReferenceConfig() {
         Map<String, String> defs = new LinkedHashMap<String, String>();
-        defs.put("simpleBean", "org.apache.shiro.config.SimpleBean");
+        defs.put("simpleBean", "org.apache.shiro.config.ogdl.SimpleBean");
         defs.put("simpleBean.intProp", "101");
-        defs.put("compositeBean", "org.apache.shiro.config.CompositeBean");
+        defs.put("compositeBean", "org.apache.shiro.config.ogdl.CompositeBean");
         defs.put("compositeBean.stringProp", "blah");
         defs.put("compositeBean.simpleBean", '$simpleBean');
 
@@ -242,8 +244,8 @@ class ReflectionBuilderTest {
     @Test
     void testObjectReferenceConfigWithTypeMismatch() {
         Map<String, String> defs = new LinkedHashMap<String, String>();
-        defs.put("simpleBean", "org.apache.shiro.config.SimpleBean");
-        defs.put("compositeBean", "org.apache.shiro.config.CompositeBean");
+        defs.put("simpleBean", "org.apache.shiro.config.ogdl.SimpleBean");
+        defs.put("compositeBean", "org.apache.shiro.config.ogdl.CompositeBean");
         defs.put("compositeBean.simpleBean", "simpleBean");
         ReflectionBuilder builder = new ReflectionBuilder();
         try {
@@ -256,8 +258,8 @@ class ReflectionBuilderTest {
     @Test
     void testObjectReferenceConfigWithInvalidReference() {
         Map<String, String> defs = new LinkedHashMap<String, String>();
-        defs.put("simpleBean", "org.apache.shiro.config.SimpleBean");
-        defs.put("compositeBean", "org.apache.shiro.config.CompositeBean");
+        defs.put("simpleBean", "org.apache.shiro.config.ogdl.SimpleBean");
+        defs.put("compositeBean", "org.apache.shiro.config.ogdl.CompositeBean");
         defs.put("compositeBean.simpleBean", '$foo');
         ReflectionBuilder builder = new ReflectionBuilder();
         try {
@@ -270,9 +272,9 @@ class ReflectionBuilderTest {
     @Test
     void testSetProperty() {
         Map<String, String> defs = new LinkedHashMap<String, String>();
-        defs.put("simpleBean1", "org.apache.shiro.config.SimpleBean");
-        defs.put("simpleBean2", "org.apache.shiro.config.SimpleBean");
-        defs.put("compositeBean", "org.apache.shiro.config.CompositeBean");
+        defs.put("simpleBean1", "org.apache.shiro.config.ogdl.SimpleBean");
+        defs.put("simpleBean2", "org.apache.shiro.config.ogdl.SimpleBean");
+        defs.put("compositeBean", "org.apache.shiro.config.ogdl.CompositeBean");
         defs.put("compositeBean.simpleBeanSet", '$simpleBean1, $simpleBean2, $simpleBean2');
         ReflectionBuilder builder = new ReflectionBuilder();
         Map objects = builder.buildObjects(defs);
@@ -290,7 +292,7 @@ class ReflectionBuilderTest {
         def set = [new SimpleBean('foo'), new SimpleBean('bar')] as Set
 
         def defs = [
-                compositeBean: 'org.apache.shiro.config.CompositeBean',
+                compositeBean: 'org.apache.shiro.config.ogdl.CompositeBean',
                 'compositeBean.simpleBeanSet': '$set'
         ]
 
@@ -311,9 +313,9 @@ class ReflectionBuilderTest {
     @Test
     void testListProperty() {
         Map<String, String> defs = new LinkedHashMap<String, String>();
-        defs.put("simpleBean1", "org.apache.shiro.config.SimpleBean");
-        defs.put("simpleBean2", "org.apache.shiro.config.SimpleBean");
-        defs.put("compositeBean", "org.apache.shiro.config.CompositeBean");
+        defs.put("simpleBean1", "org.apache.shiro.config.ogdl.SimpleBean");
+        defs.put("simpleBean2", "org.apache.shiro.config.ogdl.SimpleBean");
+        defs.put("compositeBean", "org.apache.shiro.config.ogdl.CompositeBean");
         defs.put("compositeBean.simpleBeanList", '$simpleBean1, $simpleBean2, $simpleBean2');
         ReflectionBuilder builder = new ReflectionBuilder();
         Map objects = builder.buildObjects(defs);
@@ -331,7 +333,7 @@ class ReflectionBuilderTest {
         List list = [new SimpleBean('foo'), new SimpleBean('bar')] as List
 
         def defs = [
-                compositeBean: 'org.apache.shiro.config.CompositeBean',
+                compositeBean: 'org.apache.shiro.config.ogdl.CompositeBean',
                 'compositeBean.simpleBeanList': '$list'
         ]
 
@@ -351,9 +353,9 @@ class ReflectionBuilderTest {
     @Test
     void testCollectionProperty() {
         Map<String, String> defs = new LinkedHashMap<String, String>();
-        defs.put("simpleBean1", "org.apache.shiro.config.SimpleBean");
-        defs.put("simpleBean2", "org.apache.shiro.config.SimpleBean");
-        defs.put("compositeBean", "org.apache.shiro.config.CompositeBean");
+        defs.put("simpleBean1", "org.apache.shiro.config.ogdl.SimpleBean");
+        defs.put("simpleBean2", "org.apache.shiro.config.ogdl.SimpleBean");
+        defs.put("compositeBean", "org.apache.shiro.config.ogdl.CompositeBean");
         defs.put("compositeBean.simpleBeanCollection", '$simpleBean1, $simpleBean2, $simpleBean2');
         ReflectionBuilder builder = new ReflectionBuilder();
         Map objects = builder.buildObjects(defs);
@@ -372,7 +374,7 @@ class ReflectionBuilderTest {
         def c = [new SimpleBean('foo'), new SimpleBean('bar')]
 
         def defs = [
-                compositeBean: 'org.apache.shiro.config.CompositeBean',
+                compositeBean: 'org.apache.shiro.config.ogdl.CompositeBean',
                 'compositeBean.simpleBeanCollection': '$collection'
         ]
 
@@ -398,7 +400,7 @@ class ReflectionBuilderTest {
         String hexValue = "0x" + hex;
 
         Map<String, String> defs = new LinkedHashMap<String, String>();
-        defs.put("simpleBean", "org.apache.shiro.config.SimpleBean");
+        defs.put("simpleBean", "org.apache.shiro.config.ogdl.SimpleBean");
         defs.put("simpleBean.byteArrayProp", hexValue);
         ReflectionBuilder builder = new ReflectionBuilder();
         Map objects = builder.buildObjects(defs);
@@ -418,7 +420,7 @@ class ReflectionBuilderTest {
         String base64 = Base64.encodeToString(bytes);
 
         Map<String, String> defs = new LinkedHashMap<String, String>();
-        defs.put("simpleBean", "org.apache.shiro.config.SimpleBean");
+        defs.put("simpleBean", "org.apache.shiro.config.ogdl.SimpleBean");
         defs.put("simpleBean.byteArrayProp", base64);
         ReflectionBuilder builder = new ReflectionBuilder();
         Map objects = builder.buildObjects(defs);
@@ -433,9 +435,9 @@ class ReflectionBuilderTest {
     @Test
     void testMapProperty() {
         Map<String, String> defs = new LinkedHashMap<String, String>();
-        defs.put("simpleBean1", "org.apache.shiro.config.SimpleBean");
-        defs.put("simpleBean2", "org.apache.shiro.config.SimpleBean");
-        defs.put("compositeBean", "org.apache.shiro.config.CompositeBean");
+        defs.put("simpleBean1", "org.apache.shiro.config.ogdl.SimpleBean");
+        defs.put("simpleBean2", "org.apache.shiro.config.ogdl.SimpleBean");
+        defs.put("compositeBean", "org.apache.shiro.config.ogdl.CompositeBean");
         defs.put("compositeBean.simpleBeanMap", 'simpleBean1:$simpleBean1, simpleBean2:$simpleBean2');
         ReflectionBuilder builder = new ReflectionBuilder();
         Map objects = builder.buildObjects(defs);
@@ -457,7 +459,7 @@ class ReflectionBuilderTest {
         def map = ['foo': new SimpleBean('foo'), 'bar': new SimpleBean('bar')]
 
         def defs = [
-                compositeBean: 'org.apache.shiro.config.CompositeBean',
+                compositeBean: 'org.apache.shiro.config.ogdl.CompositeBean',
                 'compositeBean.simpleBeanMap': '$map'
         ]
 
@@ -477,10 +479,10 @@ class ReflectionBuilderTest {
     @Test
     void testNestedListProperty() {
         Map<String, String> defs = new LinkedHashMap<String, String>();
-        defs.put("simpleBean1", "org.apache.shiro.config.SimpleBean");
-        defs.put("simpleBean2", "org.apache.shiro.config.SimpleBean");
-        defs.put("simpleBean3", "org.apache.shiro.config.SimpleBean");
-        defs.put("compositeBean", "org.apache.shiro.config.CompositeBean");
+        defs.put("simpleBean1", "org.apache.shiro.config.ogdl.SimpleBean");
+        defs.put("simpleBean2", "org.apache.shiro.config.ogdl.SimpleBean");
+        defs.put("simpleBean3", "org.apache.shiro.config.ogdl.SimpleBean");
+        defs.put("compositeBean", "org.apache.shiro.config.ogdl.CompositeBean");
         defs.put("compositeBean.simpleBean", '$simpleBean1');
         defs.put("compositeBean.simpleBean.simpleBeans", '$simpleBean2, $simpleBean3');
         ReflectionBuilder builder = new ReflectionBuilder();
@@ -499,7 +501,7 @@ class ReflectionBuilderTest {
     //asserts SHIRO-413
     void testInitializable() {
         def defs = [
-                initializableBean: 'org.apache.shiro.config.InitializableBean'
+                initializableBean: 'org.apache.shiro.config.ogdl.InitializableBean'
         ]
         def builder = new ReflectionBuilder()
         def objects = builder.buildObjects(defs)
@@ -510,10 +512,10 @@ class ReflectionBuilderTest {
     @Test
     void testFactoryInstantiation() {
         Map<String, String> defs = new LinkedHashMap<String, String>();
-        defs.put("simpleBeanFactory", "org.apache.shiro.config.SimpleBeanFactory");
+        defs.put("simpleBeanFactory", "org.apache.shiro.config.ogdl.SimpleBeanFactory");
         defs.put("simpleBeanFactory.factoryInt", "5");
         defs.put("simpleBeanFactory.factoryString", "someString");
-        defs.put("compositeBean", "org.apache.shiro.config.CompositeBean");
+        defs.put("compositeBean", "org.apache.shiro.config.ogdl.CompositeBean");
         defs.put("compositeBean.simpleBean", '$simpleBeanFactory');
 
         ReflectionBuilder builder = new ReflectionBuilder();
@@ -531,15 +533,15 @@ class ReflectionBuilderTest {
 
         def ini = new Ini();
         ini.load '''
-            loggingListener = org.apache.shiro.config.event.LoggingBeanEventListener
-            listenerOne = org.apache.shiro.config.RecordingBeanListener
-            listenerTwo = org.apache.shiro.config.RecordingBeanListener
+            loggingListener = org.apache.shiro.config.ogdl.event.LoggingBeanEventListener
+            listenerOne = org.apache.shiro.config.ogdl.RecordingBeanListener
+            listenerTwo = org.apache.shiro.config.ogdl.RecordingBeanListener
 
-            simpleBeanFactory = org.apache.shiro.config.SimpleBeanFactory
+            simpleBeanFactory = org.apache.shiro.config.ogdl.SimpleBeanFactory
             simpleBeanFactory.factoryInt = 5
             simpleBeanFactory.factoryString = someString
 
-            compositeBean = org.apache.shiro.config.CompositeBean
+            compositeBean = org.apache.shiro.config.ogdl.CompositeBean
             compositeBean.simpleBean = $simpleBeanFactory
         '''
 
@@ -568,7 +570,7 @@ class ReflectionBuilderTest {
     void testEnum() {
         def ini = new Ini()
         ini.load '''
-            simpleBean = org.apache.shiro.config.SimpleBean
+            simpleBean = org.apache.shiro.config.ogdl.SimpleBean
             simpleBean.name = testEnum
             simpleBean.simpleEnum = FOO
         '''
@@ -589,10 +591,10 @@ class ReflectionBuilderTest {
     void testSimpleInterpolation() {
 
         Map<String, String> defs = new LinkedHashMap<String, String>();
-        defs.put("simpleBeanFactory", "org.apache.shiro.config.SimpleBeanFactory");
+        defs.put("simpleBeanFactory", "org.apache.shiro.config.ogdl.SimpleBeanFactory");
         defs.put("simpleBeanFactory.factoryInt", "5");
         defs.put("simpleBeanFactory.factoryString", "\${os.name}");
-        defs.put("compositeBean", "org.apache.shiro.config.CompositeBean");
+        defs.put("compositeBean", "org.apache.shiro.config.ogdl.CompositeBean");
         defs.put("compositeBean.simpleBean", '$simpleBeanFactory');
 
         ReflectionBuilder builder = new ReflectionBuilder();
@@ -615,10 +617,10 @@ class ReflectionBuilderTest {
         // using os.name and os.arch because they are available on every system
 
         Map<String, String> defs = new LinkedHashMap<String, String>();
-        defs.put("simpleBean1", "org.apache.shiro.config.SimpleBean");
+        defs.put("simpleBean1", "org.apache.shiro.config.ogdl.SimpleBean");
         defs.put("simpleBean1.stringList", "\${os.name}, \${os.arch}");
-        defs.put("simpleBean2", "org.apache.shiro.config.SimpleBean");
-        defs.put("compositeBean", "org.apache.shiro.config.CompositeBean");
+        defs.put("simpleBean2", "org.apache.shiro.config.ogdl.SimpleBean");
+        defs.put("compositeBean", "org.apache.shiro.config.ogdl.CompositeBean");
         defs.put("compositeBean.simpleBeanMap", '\${os.name}:$simpleBean1, two:$simpleBean2');
 
         ReflectionBuilder builder = new ReflectionBuilder();
diff --git a/config/ogdl/src/test/groovy/org/apache/shiro/config/SimpleBean.groovy b/config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/SimpleBean.groovy
similarity index 96%
rename from config/ogdl/src/test/groovy/org/apache/shiro/config/SimpleBean.groovy
rename to config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/SimpleBean.groovy
index 6bc0cf2..8fd9b7f 100644
--- a/config/ogdl/src/test/groovy/org/apache/shiro/config/SimpleBean.groovy
+++ b/config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/SimpleBean.groovy
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config
+package org.apache.shiro.config.ogdl
 
 class SimpleBean {
 
diff --git a/config/ogdl/src/test/groovy/org/apache/shiro/config/SimpleBeanFactory.groovy b/config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/SimpleBeanFactory.groovy
similarity index 89%
rename from config/ogdl/src/test/groovy/org/apache/shiro/config/SimpleBeanFactory.groovy
rename to config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/SimpleBeanFactory.groovy
index bc2edde..6026374 100644
--- a/config/ogdl/src/test/groovy/org/apache/shiro/config/SimpleBeanFactory.groovy
+++ b/config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/SimpleBeanFactory.groovy
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config
+package org.apache.shiro.config.ogdl
 
-class SimpleBeanFactory implements org.apache.shiro.util.Factory<SimpleBean> {
+class SimpleBeanFactory implements org.apache.shiro.lang.util.Factory<SimpleBean> {
 
     int factoryInt;
     String factoryString;
diff --git a/config/ogdl/src/test/groovy/org/apache/shiro/config/SimpleEnum.groovy b/config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/SimpleEnum.groovy
similarity index 95%
rename from config/ogdl/src/test/groovy/org/apache/shiro/config/SimpleEnum.groovy
rename to config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/SimpleEnum.groovy
index ea18938..fef6120 100644
--- a/config/ogdl/src/test/groovy/org/apache/shiro/config/SimpleEnum.groovy
+++ b/config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/SimpleEnum.groovy
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config
+package org.apache.shiro.config.ogdl
 
 enum SimpleEnum {
     FOO,
diff --git a/config/ogdl/src/test/groovy/org/apache/shiro/config/event/BeanEventTest.groovy b/config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/event/BeanEventTest.groovy
similarity index 97%
rename from config/ogdl/src/test/groovy/org/apache/shiro/config/event/BeanEventTest.groovy
rename to config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/event/BeanEventTest.groovy
index f0ca32c..cf908bf 100644
--- a/config/ogdl/src/test/groovy/org/apache/shiro/config/event/BeanEventTest.groovy
+++ b/config/ogdl/src/test/groovy/org/apache/shiro/config/ogdl/event/BeanEventTest.groovy
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config.event
+package org.apache.shiro.config.ogdl.event
 
 import org.junit.Test
 
diff --git a/core/pom.xml b/core/pom.xml
index bf3ac48..3c247f1 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -52,9 +52,29 @@
                 <configuration>
                     <instructions>
                         <Bundle-SymbolicName>org.apache.shiro.core</Bundle-SymbolicName>
-                        <Export-Package>org.apache.shiro*;version=${project.version}</Export-Package>
+                        <Export-Package>
+                            org.apache.shiro;version=${project.version},
+                            org.apache.shiro.aop;version=${project.version},
+                            org.apache.shiro.authc*;version=${project.version},
+                            org.apache.shiro.authz*;version=${project.version},
+                            org.apache.shiro.concurrent;version=${project.version},
+                            org.apache.shiro.dao;version=${project.version},
+                            org.apache.shiro.env;version=${project.version},
+                            org.apache.shiro.ini;version=${project.version},
+                            org.apache.shiro.jndi;version=${project.version},
+                            org.apache.shiro.ldap;version=${project.version},
+                            org.apache.shiro.mgt;version=${project.version},
+                            org.apache.shiro.realm*;version=${project.version},
+                            org.apache.shiro.session*;version=${project.version},
+                            org.apache.shiro.subject*;version=${project.version},
+                            org.apache.shiro.util;version=${project.version},
+                        </Export-Package>
                         <Import-Package>
-                            org.apache.shiro*;version="${shiro.osgi.importRange}",
+                            org.apache.shiro.lang*;version="${shiro.osgi.importRange}",
+                            org.apache.shiro.cache*;version="${shiro.osgi.importRange}",
+                            org.apache.shiro.config*;version="${shiro.osgi.importRange}",
+                            org.apache.shiro.crypto*;version="${shiro.osgi.importRange}",
+                            org.apache.shiro.event*;version="${shiro.osgi.importRange}",
                             org.apache.commons.beanutils*;resolution:=optional,
                             org.apache.commons.configuration2*;resolution:=optional,
                             *
diff --git a/core/src/main/java/org/apache/shiro/UnavailableSecurityManagerException.java b/core/src/main/java/org/apache/shiro/UnavailableSecurityManagerException.java
index 9f07670..9a9fffd 100644
--- a/core/src/main/java/org/apache/shiro/UnavailableSecurityManagerException.java
+++ b/core/src/main/java/org/apache/shiro/UnavailableSecurityManagerException.java
@@ -18,6 +18,8 @@
  */
 package org.apache.shiro;
 
+import org.apache.shiro.lang.ShiroException;
+
 /**
  * Exception thrown when attempting to acquire the application's {@code SecurityManager} instance, but Shiro's
  * lookup heuristics cannot find one.  This typically indicates an invalid application configuration.
diff --git a/core/src/main/java/org/apache/shiro/authc/AuthenticationException.java b/core/src/main/java/org/apache/shiro/authc/AuthenticationException.java
index 056b30b..18ee770 100644
--- a/core/src/main/java/org/apache/shiro/authc/AuthenticationException.java
+++ b/core/src/main/java/org/apache/shiro/authc/AuthenticationException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.authc;
 
-import org.apache.shiro.ShiroException;
+import org.apache.shiro.lang.ShiroException;
 
 
 /**
diff --git a/core/src/main/java/org/apache/shiro/authc/SaltedAuthenticationInfo.java b/core/src/main/java/org/apache/shiro/authc/SaltedAuthenticationInfo.java
index d4dd09e..f490385 100644
--- a/core/src/main/java/org/apache/shiro/authc/SaltedAuthenticationInfo.java
+++ b/core/src/main/java/org/apache/shiro/authc/SaltedAuthenticationInfo.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.authc;
 
-import org.apache.shiro.util.ByteSource;
+import org.apache.shiro.lang.util.ByteSource;
 
 /**
  * Interface representing account information that may use a salt when hashing credentials.  This interface
diff --git a/core/src/main/java/org/apache/shiro/authc/SimpleAccount.java b/core/src/main/java/org/apache/shiro/authc/SimpleAccount.java
index 933cbbf..bbd3202 100644
--- a/core/src/main/java/org/apache/shiro/authc/SimpleAccount.java
+++ b/core/src/main/java/org/apache/shiro/authc/SimpleAccount.java
@@ -22,7 +22,7 @@ import org.apache.shiro.authz.Permission;
 import org.apache.shiro.authz.SimpleAuthorizationInfo;
 import org.apache.shiro.subject.PrincipalCollection;
 import org.apache.shiro.subject.SimplePrincipalCollection;
-import org.apache.shiro.util.ByteSource;
+import org.apache.shiro.lang.util.ByteSource;
 
 import java.io.Serializable;
 import java.util.Collection;
diff --git a/core/src/main/java/org/apache/shiro/authc/SimpleAuthenticationInfo.java b/core/src/main/java/org/apache/shiro/authc/SimpleAuthenticationInfo.java
index f0b6ac3..63d3cf5 100644
--- a/core/src/main/java/org/apache/shiro/authc/SimpleAuthenticationInfo.java
+++ b/core/src/main/java/org/apache/shiro/authc/SimpleAuthenticationInfo.java
@@ -21,7 +21,7 @@ package org.apache.shiro.authc;
 import org.apache.shiro.subject.MutablePrincipalCollection;
 import org.apache.shiro.subject.PrincipalCollection;
 import org.apache.shiro.subject.SimplePrincipalCollection;
-import org.apache.shiro.util.ByteSource;
+import org.apache.shiro.lang.util.ByteSource;
 
 import java.util.Collection;
 import java.util.HashSet;
diff --git a/core/src/main/java/org/apache/shiro/authc/credential/DefaultPasswordService.java b/core/src/main/java/org/apache/shiro/authc/credential/DefaultPasswordService.java
index c2ec183..ea12668 100644
--- a/core/src/main/java/org/apache/shiro/authc/credential/DefaultPasswordService.java
+++ b/core/src/main/java/org/apache/shiro/authc/credential/DefaultPasswordService.java
@@ -25,7 +25,7 @@ import org.apache.shiro.crypto.hash.Hash;
 import org.apache.shiro.crypto.hash.HashRequest;
 import org.apache.shiro.crypto.hash.HashService;
 import org.apache.shiro.crypto.hash.format.*;
-import org.apache.shiro.util.ByteSource;
+import org.apache.shiro.lang.util.ByteSource;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/core/src/main/java/org/apache/shiro/authc/credential/HashedCredentialsMatcher.java b/core/src/main/java/org/apache/shiro/authc/credential/HashedCredentialsMatcher.java
index 274127d..1377374 100644
--- a/core/src/main/java/org/apache/shiro/authc/credential/HashedCredentialsMatcher.java
+++ b/core/src/main/java/org/apache/shiro/authc/credential/HashedCredentialsMatcher.java
@@ -21,12 +21,12 @@ package org.apache.shiro.authc.credential;
 import org.apache.shiro.authc.AuthenticationInfo;
 import org.apache.shiro.authc.AuthenticationToken;
 import org.apache.shiro.authc.SaltedAuthenticationInfo;
-import org.apache.shiro.codec.Base64;
-import org.apache.shiro.codec.Hex;
+import org.apache.shiro.lang.codec.Base64;
+import org.apache.shiro.lang.codec.Hex;
 import org.apache.shiro.crypto.hash.AbstractHash;
 import org.apache.shiro.crypto.hash.Hash;
 import org.apache.shiro.crypto.hash.SimpleHash;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 
 /**
  * A {@code HashedCredentialMatcher} provides support for hashing of supplied {@code AuthenticationToken} credentials
diff --git a/core/src/main/java/org/apache/shiro/authc/credential/HashingPasswordService.java b/core/src/main/java/org/apache/shiro/authc/credential/HashingPasswordService.java
index 121626a..618631e 100644
--- a/core/src/main/java/org/apache/shiro/authc/credential/HashingPasswordService.java
+++ b/core/src/main/java/org/apache/shiro/authc/credential/HashingPasswordService.java
@@ -19,7 +19,7 @@
 package org.apache.shiro.authc.credential;
 
 import org.apache.shiro.crypto.hash.Hash;
-import org.apache.shiro.util.ByteSource;
+import org.apache.shiro.lang.util.ByteSource;
 
 /**
  * A {@code HashingPasswordService} is a {@link PasswordService} that performs password encryption and comparisons
diff --git a/core/src/main/java/org/apache/shiro/authc/credential/PasswordService.java b/core/src/main/java/org/apache/shiro/authc/credential/PasswordService.java
index bd35600..b322e0a 100644
--- a/core/src/main/java/org/apache/shiro/authc/credential/PasswordService.java
+++ b/core/src/main/java/org/apache/shiro/authc/credential/PasswordService.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.authc.credential;
 
-import org.apache.shiro.util.ByteSource;
+import org.apache.shiro.lang.util.ByteSource;
 
 /**
  * A {@code PasswordService} supports common use cases when using passwords as a credentials mechanism.
diff --git a/core/src/main/java/org/apache/shiro/authc/credential/SimpleCredentialsMatcher.java b/core/src/main/java/org/apache/shiro/authc/credential/SimpleCredentialsMatcher.java
index 55eb47e..c8132c9 100644
--- a/core/src/main/java/org/apache/shiro/authc/credential/SimpleCredentialsMatcher.java
+++ b/core/src/main/java/org/apache/shiro/authc/credential/SimpleCredentialsMatcher.java
@@ -20,7 +20,7 @@ package org.apache.shiro.authc.credential;
 
 import org.apache.shiro.authc.AuthenticationInfo;
 import org.apache.shiro.authc.AuthenticationToken;
-import org.apache.shiro.codec.CodecSupport;
+import org.apache.shiro.lang.codec.CodecSupport;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/core/src/main/java/org/apache/shiro/authz/AuthorizationException.java b/core/src/main/java/org/apache/shiro/authz/AuthorizationException.java
index 41ccce9..317decf 100644
--- a/core/src/main/java/org/apache/shiro/authz/AuthorizationException.java
+++ b/core/src/main/java/org/apache/shiro/authz/AuthorizationException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.authz;
 
-import org.apache.shiro.ShiroException;
+import org.apache.shiro.lang.ShiroException;
 
 
 /**
diff --git a/core/src/main/java/org/apache/shiro/authz/permission/DomainPermission.java b/core/src/main/java/org/apache/shiro/authz/permission/DomainPermission.java
index f5a28fd..cfdc0b2 100644
--- a/core/src/main/java/org/apache/shiro/authz/permission/DomainPermission.java
+++ b/core/src/main/java/org/apache/shiro/authz/permission/DomainPermission.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.authz.permission;
 
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 
 import java.util.Set;
 
diff --git a/core/src/main/java/org/apache/shiro/authz/permission/InvalidPermissionStringException.java b/core/src/main/java/org/apache/shiro/authz/permission/InvalidPermissionStringException.java
index fb830f9..d7c1940 100644
--- a/core/src/main/java/org/apache/shiro/authz/permission/InvalidPermissionStringException.java
+++ b/core/src/main/java/org/apache/shiro/authz/permission/InvalidPermissionStringException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.authz.permission;
 
-import org.apache.shiro.ShiroException;
+import org.apache.shiro.lang.ShiroException;
 
 
 /**
diff --git a/core/src/main/java/org/apache/shiro/authz/permission/WildcardPermission.java b/core/src/main/java/org/apache/shiro/authz/permission/WildcardPermission.java
index 484ed97..2eeaffb 100644
--- a/core/src/main/java/org/apache/shiro/authz/permission/WildcardPermission.java
+++ b/core/src/main/java/org/apache/shiro/authz/permission/WildcardPermission.java
@@ -20,12 +20,11 @@ package org.apache.shiro.authz.permission;
 
 import org.apache.shiro.authz.Permission;
 import org.apache.shiro.util.CollectionUtils;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Iterator;
-import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Set;
 
diff --git a/core/src/main/java/org/apache/shiro/dao/DataAccessException.java b/core/src/main/java/org/apache/shiro/dao/DataAccessException.java
index 84ce736..a5d6627 100644
--- a/core/src/main/java/org/apache/shiro/dao/DataAccessException.java
+++ b/core/src/main/java/org/apache/shiro/dao/DataAccessException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.dao;
 
-import org.apache.shiro.ShiroException;
+import org.apache.shiro.lang.ShiroException;
 
 /**
  * Generic exception representing a problem when attempting to access data.
diff --git a/core/src/main/java/org/apache/shiro/env/BasicIniEnvironment.java b/core/src/main/java/org/apache/shiro/env/BasicIniEnvironment.java
index 6eacbb9..c12d684 100644
--- a/core/src/main/java/org/apache/shiro/env/BasicIniEnvironment.java
+++ b/core/src/main/java/org/apache/shiro/env/BasicIniEnvironment.java
@@ -19,8 +19,7 @@
 package org.apache.shiro.env;
 
 import org.apache.shiro.config.Ini;
-import org.apache.shiro.config.IniSecurityManagerFactory;
-import org.apache.shiro.mgt.SecurityManager;
+import org.apache.shiro.ini.IniSecurityManagerFactory;
 
 /**
  * Basic usage:<p>
diff --git a/core/src/main/java/org/apache/shiro/env/DefaultEnvironment.java b/core/src/main/java/org/apache/shiro/env/DefaultEnvironment.java
index 13843ed..43523a0 100644
--- a/core/src/main/java/org/apache/shiro/env/DefaultEnvironment.java
+++ b/core/src/main/java/org/apache/shiro/env/DefaultEnvironment.java
@@ -19,8 +19,8 @@
 package org.apache.shiro.env;
 
 import org.apache.shiro.mgt.SecurityManager;
-import org.apache.shiro.util.Destroyable;
-import org.apache.shiro.util.LifecycleUtils;
+import org.apache.shiro.lang.util.Destroyable;
+import org.apache.shiro.lang.util.LifecycleUtils;
 
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
diff --git a/core/src/main/java/org/apache/shiro/env/EnvironmentException.java b/core/src/main/java/org/apache/shiro/env/EnvironmentException.java
index 1ab5158..3c6cba0 100644
--- a/core/src/main/java/org/apache/shiro/env/EnvironmentException.java
+++ b/core/src/main/java/org/apache/shiro/env/EnvironmentException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.env;
 
-import org.apache.shiro.ShiroException;
+import org.apache.shiro.lang.ShiroException;
 
 /**
  * Exception thrown for errors related to {@link Environment} instances or configuration.
diff --git a/core/src/main/java/org/apache/shiro/config/IniFactorySupport.java b/core/src/main/java/org/apache/shiro/ini/IniFactorySupport.java
similarity index 97%
rename from core/src/main/java/org/apache/shiro/config/IniFactorySupport.java
rename to core/src/main/java/org/apache/shiro/ini/IniFactorySupport.java
index 17ebff0..b83477e 100644
--- a/core/src/main/java/org/apache/shiro/config/IniFactorySupport.java
+++ b/core/src/main/java/org/apache/shiro/ini/IniFactorySupport.java
@@ -16,16 +16,16 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config;
+package org.apache.shiro.ini;
 
-import org.apache.shiro.io.ResourceUtils;
+import org.apache.shiro.config.Ini;
+import org.apache.shiro.lang.io.ResourceUtils;
 import org.apache.shiro.util.AbstractFactory;
 import org.apache.shiro.util.CollectionUtils;
-import org.apache.shiro.util.Factory;
+import org.apache.shiro.lang.util.Factory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.HashMap;
 import java.util.Map;
 
 /**
diff --git a/core/src/main/java/org/apache/shiro/config/IniSecurityManagerFactory.java b/core/src/main/java/org/apache/shiro/ini/IniSecurityManagerFactory.java
similarity index 97%
rename from core/src/main/java/org/apache/shiro/config/IniSecurityManagerFactory.java
rename to core/src/main/java/org/apache/shiro/ini/IniSecurityManagerFactory.java
index b5d4431..171292a 100644
--- a/core/src/main/java/org/apache/shiro/config/IniSecurityManagerFactory.java
+++ b/core/src/main/java/org/apache/shiro/ini/IniSecurityManagerFactory.java
@@ -16,8 +16,11 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config;
+package org.apache.shiro.ini;
 
+import org.apache.shiro.config.ConfigurationException;
+import org.apache.shiro.config.Ini;
+import org.apache.shiro.config.ogdl.ReflectionBuilder;
 import org.apache.shiro.mgt.DefaultSecurityManager;
 import org.apache.shiro.mgt.RealmSecurityManager;
 import org.apache.shiro.mgt.SecurityManager;
@@ -25,9 +28,9 @@ import org.apache.shiro.realm.Realm;
 import org.apache.shiro.realm.RealmFactory;
 import org.apache.shiro.realm.text.IniRealm;
 import org.apache.shiro.util.CollectionUtils;
-import org.apache.shiro.util.Factory;
-import org.apache.shiro.util.LifecycleUtils;
-import org.apache.shiro.util.Nameable;
+import org.apache.shiro.lang.util.Factory;
+import org.apache.shiro.lang.util.LifecycleUtils;
+import org.apache.shiro.lang.util.Nameable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/core/src/main/java/org/apache/shiro/jndi/JndiObjectFactory.java b/core/src/main/java/org/apache/shiro/jndi/JndiObjectFactory.java
index 5bc9d63..a67bf30 100644
--- a/core/src/main/java/org/apache/shiro/jndi/JndiObjectFactory.java
+++ b/core/src/main/java/org/apache/shiro/jndi/JndiObjectFactory.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.jndi;
 
-import org.apache.shiro.util.Factory;
+import org.apache.shiro.lang.util.Factory;
 
 import javax.naming.NamingException;
 
diff --git a/core/src/main/java/org/apache/shiro/mgt/AbstractRememberMeManager.java b/core/src/main/java/org/apache/shiro/mgt/AbstractRememberMeManager.java
index 4d15abe..72a25dc 100644
--- a/core/src/main/java/org/apache/shiro/mgt/AbstractRememberMeManager.java
+++ b/core/src/main/java/org/apache/shiro/mgt/AbstractRememberMeManager.java
@@ -22,21 +22,20 @@ import org.apache.shiro.authc.AuthenticationException;
 import org.apache.shiro.authc.AuthenticationInfo;
 import org.apache.shiro.authc.AuthenticationToken;
 import org.apache.shiro.authc.RememberMeAuthenticationToken;
-import org.apache.shiro.codec.Base64;
-import org.apache.shiro.crypto.AesCipherService;
-import org.apache.shiro.crypto.CipherService;
-import org.apache.shiro.io.DefaultSerializer;
-import org.apache.shiro.io.Serializer;
+import org.apache.shiro.crypto.cipher.AesCipherService;
+import org.apache.shiro.crypto.cipher.CipherService;
+import org.apache.shiro.lang.io.DefaultSerializer;
+import org.apache.shiro.lang.io.Serializer;
 import org.apache.shiro.subject.PrincipalCollection;
 import org.apache.shiro.subject.Subject;
 import org.apache.shiro.subject.SubjectContext;
-import org.apache.shiro.util.ByteSource;
+import org.apache.shiro.lang.util.ByteSource;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
  * Abstract implementation of the {@code RememberMeManager} interface that handles
- * {@link #setSerializer(org.apache.shiro.io.Serializer) serialization} and
+ * {@link #setSerializer(org.apache.shiro.lang.io.Serializer) serialization} and
  * {@link #setCipherService encryption} of the remembered user identity.
  * <p/>
  * The remembered identity storage location and details are left to subclasses.
@@ -56,7 +55,7 @@ import org.slf4j.LoggerFactory;
  * However, if you do feel this constitutes sensitive information, it is recommended that you provide your own
  * {@code key} via the {@link #setCipherKey setCipherKey} method to a key known only to your application,
  * guaranteeing that no third party can decrypt your data.  You can generate your own key by calling the
- * {@code CipherService}'s {@link org.apache.shiro.crypto.AesCipherService#generateNewKey() generateNewKey} method
+ * {@code CipherService}'s {@link AesCipherService#generateNewKey() generateNewKey} method
  * and using that result as the {@link #setCipherKey cipherKey} configuration attribute.
  *
  * @since 0.9
@@ -104,7 +103,7 @@ public abstract class AbstractRememberMeManager implements RememberMeManager {
      * persistent remember me storage.
      * <p/>
      * Unless overridden by the {@link #setSerializer} method, the default instance is a
-     * {@link org.apache.shiro.io.DefaultSerializer}.
+     * {@link org.apache.shiro.lang.io.DefaultSerializer}.
      *
      * @return the {@code Serializer} used to serialize and deserialize {@link PrincipalCollection} instances for
      *         persistent remember me storage.
diff --git a/core/src/main/java/org/apache/shiro/mgt/AuthenticatingSecurityManager.java b/core/src/main/java/org/apache/shiro/mgt/AuthenticatingSecurityManager.java
index 989d031..6720903 100644
--- a/core/src/main/java/org/apache/shiro/mgt/AuthenticatingSecurityManager.java
+++ b/core/src/main/java/org/apache/shiro/mgt/AuthenticatingSecurityManager.java
@@ -23,7 +23,7 @@ import org.apache.shiro.authc.AuthenticationInfo;
 import org.apache.shiro.authc.AuthenticationToken;
 import org.apache.shiro.authc.Authenticator;
 import org.apache.shiro.authc.pam.ModularRealmAuthenticator;
-import org.apache.shiro.util.LifecycleUtils;
+import org.apache.shiro.lang.util.LifecycleUtils;
 
 
 /**
diff --git a/core/src/main/java/org/apache/shiro/mgt/AuthorizingSecurityManager.java b/core/src/main/java/org/apache/shiro/mgt/AuthorizingSecurityManager.java
index c156ff8..e2555d8 100644
--- a/core/src/main/java/org/apache/shiro/mgt/AuthorizingSecurityManager.java
+++ b/core/src/main/java/org/apache/shiro/mgt/AuthorizingSecurityManager.java
@@ -23,7 +23,7 @@ import org.apache.shiro.authz.Authorizer;
 import org.apache.shiro.authz.ModularRealmAuthorizer;
 import org.apache.shiro.authz.Permission;
 import org.apache.shiro.subject.PrincipalCollection;
-import org.apache.shiro.util.LifecycleUtils;
+import org.apache.shiro.lang.util.LifecycleUtils;
 
 import java.util.Collection;
 import java.util.List;
diff --git a/core/src/main/java/org/apache/shiro/mgt/CachingSecurityManager.java b/core/src/main/java/org/apache/shiro/mgt/CachingSecurityManager.java
index 1001dd8..80219d4 100644
--- a/core/src/main/java/org/apache/shiro/mgt/CachingSecurityManager.java
+++ b/core/src/main/java/org/apache/shiro/mgt/CachingSecurityManager.java
@@ -23,8 +23,8 @@ import org.apache.shiro.cache.CacheManagerAware;
 import org.apache.shiro.event.EventBus;
 import org.apache.shiro.event.EventBusAware;
 import org.apache.shiro.event.support.DefaultEventBus;
-import org.apache.shiro.util.Destroyable;
-import org.apache.shiro.util.LifecycleUtils;
+import org.apache.shiro.lang.util.Destroyable;
+import org.apache.shiro.lang.util.LifecycleUtils;
 
 
 /**
diff --git a/core/src/main/java/org/apache/shiro/mgt/RealmSecurityManager.java b/core/src/main/java/org/apache/shiro/mgt/RealmSecurityManager.java
index f5392e2..aaca9d8 100644
--- a/core/src/main/java/org/apache/shiro/mgt/RealmSecurityManager.java
+++ b/core/src/main/java/org/apache/shiro/mgt/RealmSecurityManager.java
@@ -23,7 +23,7 @@ import org.apache.shiro.cache.CacheManagerAware;
 import org.apache.shiro.event.EventBus;
 import org.apache.shiro.event.EventBusAware;
 import org.apache.shiro.realm.Realm;
-import org.apache.shiro.util.LifecycleUtils;
+import org.apache.shiro.lang.util.LifecycleUtils;
 
 import java.util.ArrayList;
 import java.util.Collection;
diff --git a/core/src/main/java/org/apache/shiro/mgt/SessionsSecurityManager.java b/core/src/main/java/org/apache/shiro/mgt/SessionsSecurityManager.java
index eb00b56..8271e4c 100644
--- a/core/src/main/java/org/apache/shiro/mgt/SessionsSecurityManager.java
+++ b/core/src/main/java/org/apache/shiro/mgt/SessionsSecurityManager.java
@@ -28,7 +28,7 @@ import org.apache.shiro.session.mgt.DefaultSessionManager;
 import org.apache.shiro.session.mgt.SessionContext;
 import org.apache.shiro.session.mgt.SessionKey;
 import org.apache.shiro.session.mgt.SessionManager;
-import org.apache.shiro.util.LifecycleUtils;
+import org.apache.shiro.lang.util.LifecycleUtils;
 
 
 /**
diff --git a/core/src/main/java/org/apache/shiro/package-info.java b/core/src/main/java/org/apache/shiro/package-info.java
index a380c7a..5da4cfa 100644
--- a/core/src/main/java/org/apache/shiro/package-info.java
+++ b/core/src/main/java/org/apache/shiro/package-info.java
@@ -19,6 +19,6 @@
 /**
  * This package primarily exists as a root classpath distinction, but it does contain two core classes widely used
  * by applications, {@link org.apache.shiro.SecurityUtils SecurityUtils} and
- * {@link org.apache.shiro.ShiroException ShiroException}.
+ * {@link org.apache.shiro.lang.ShiroException ShiroException}.
  */
 package org.apache.shiro;
diff --git a/core/src/main/java/org/apache/shiro/realm/AuthenticatingRealm.java b/core/src/main/java/org/apache/shiro/realm/AuthenticatingRealm.java
index ef79825..87c1bc5 100644
--- a/core/src/main/java/org/apache/shiro/realm/AuthenticatingRealm.java
+++ b/core/src/main/java/org/apache/shiro/realm/AuthenticatingRealm.java
@@ -29,7 +29,7 @@ import org.apache.shiro.authc.credential.SimpleCredentialsMatcher;
 import org.apache.shiro.cache.Cache;
 import org.apache.shiro.cache.CacheManager;
 import org.apache.shiro.subject.PrincipalCollection;
-import org.apache.shiro.util.Initializable;
+import org.apache.shiro.lang.util.Initializable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/core/src/main/java/org/apache/shiro/realm/AuthorizingRealm.java b/core/src/main/java/org/apache/shiro/realm/AuthorizingRealm.java
index 8f69a24..e8bf236 100644
--- a/core/src/main/java/org/apache/shiro/realm/AuthorizingRealm.java
+++ b/core/src/main/java/org/apache/shiro/realm/AuthorizingRealm.java
@@ -25,8 +25,8 @@ import org.apache.shiro.cache.Cache;
 import org.apache.shiro.cache.CacheManager;
 import org.apache.shiro.subject.PrincipalCollection;
 import org.apache.shiro.util.CollectionUtils;
-import org.apache.shiro.util.Initializable;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.Initializable;
+import org.apache.shiro.lang.util.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/core/src/main/java/org/apache/shiro/realm/CachingRealm.java b/core/src/main/java/org/apache/shiro/realm/CachingRealm.java
index fbb3b6b..4f9fffe 100644
--- a/core/src/main/java/org/apache/shiro/realm/CachingRealm.java
+++ b/core/src/main/java/org/apache/shiro/realm/CachingRealm.java
@@ -23,7 +23,7 @@ import org.apache.shiro.cache.CacheManager;
 import org.apache.shiro.cache.CacheManagerAware;
 import org.apache.shiro.subject.PrincipalCollection;
 import org.apache.shiro.util.CollectionUtils;
-import org.apache.shiro.util.Nameable;
+import org.apache.shiro.lang.util.Nameable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/core/src/main/java/org/apache/shiro/realm/jdbc/JdbcRealm.java b/core/src/main/java/org/apache/shiro/realm/jdbc/JdbcRealm.java
index 37f8885..58ab0e0 100644
--- a/core/src/main/java/org/apache/shiro/realm/jdbc/JdbcRealm.java
+++ b/core/src/main/java/org/apache/shiro/realm/jdbc/JdbcRealm.java
@@ -28,11 +28,11 @@ import org.apache.shiro.authc.UsernamePasswordToken;
 import org.apache.shiro.authz.AuthorizationException;
 import org.apache.shiro.authz.AuthorizationInfo;
 import org.apache.shiro.authz.SimpleAuthorizationInfo;
-import org.apache.shiro.codec.Base64;
+import org.apache.shiro.lang.codec.Base64;
 import org.apache.shiro.config.ConfigurationException;
 import org.apache.shiro.realm.AuthorizingRealm;
 import org.apache.shiro.subject.PrincipalCollection;
-import org.apache.shiro.util.ByteSource;
+import org.apache.shiro.lang.util.ByteSource;
 import org.apache.shiro.util.JdbcUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
diff --git a/core/src/main/java/org/apache/shiro/realm/jndi/JndiRealmFactory.java b/core/src/main/java/org/apache/shiro/realm/jndi/JndiRealmFactory.java
index 9657973..973824e 100644
--- a/core/src/main/java/org/apache/shiro/realm/jndi/JndiRealmFactory.java
+++ b/core/src/main/java/org/apache/shiro/realm/jndi/JndiRealmFactory.java
@@ -26,7 +26,7 @@ import java.util.List;
 import org.apache.shiro.jndi.JndiLocator;
 import org.apache.shiro.realm.Realm;
 import org.apache.shiro.realm.RealmFactory;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 
 
 /**
diff --git a/core/src/main/java/org/apache/shiro/realm/ldap/DefaultLdapContextFactory.java b/core/src/main/java/org/apache/shiro/realm/ldap/DefaultLdapContextFactory.java
index a5e8af8..db2b72c 100644
--- a/core/src/main/java/org/apache/shiro/realm/ldap/DefaultLdapContextFactory.java
+++ b/core/src/main/java/org/apache/shiro/realm/ldap/DefaultLdapContextFactory.java
@@ -26,7 +26,7 @@ import javax.naming.NamingException;
 import javax.naming.ldap.InitialLdapContext;
 import javax.naming.ldap.LdapContext;
 
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/core/src/main/java/org/apache/shiro/realm/ldap/DefaultLdapRealm.java b/core/src/main/java/org/apache/shiro/realm/ldap/DefaultLdapRealm.java
index dec43a9..d28eb21 100644
--- a/core/src/main/java/org/apache/shiro/realm/ldap/DefaultLdapRealm.java
+++ b/core/src/main/java/org/apache/shiro/realm/ldap/DefaultLdapRealm.java
@@ -28,7 +28,7 @@ import org.apache.shiro.authz.AuthorizationInfo;
 import org.apache.shiro.ldap.UnsupportedAuthenticationMechanismException;
 import org.apache.shiro.realm.AuthorizingRealm;
 import org.apache.shiro.subject.PrincipalCollection;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/core/src/main/java/org/apache/shiro/realm/ldap/JndiLdapContextFactory.java b/core/src/main/java/org/apache/shiro/realm/ldap/JndiLdapContextFactory.java
index ca9ff25..548057e 100644
--- a/core/src/main/java/org/apache/shiro/realm/ldap/JndiLdapContextFactory.java
+++ b/core/src/main/java/org/apache/shiro/realm/ldap/JndiLdapContextFactory.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.realm.ldap;
 
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/core/src/main/java/org/apache/shiro/realm/text/IniRealm.java b/core/src/main/java/org/apache/shiro/realm/text/IniRealm.java
index 3a0540c..bf8890f 100644
--- a/core/src/main/java/org/apache/shiro/realm/text/IniRealm.java
+++ b/core/src/main/java/org/apache/shiro/realm/text/IniRealm.java
@@ -20,7 +20,7 @@ package org.apache.shiro.realm.text;
 
 import org.apache.shiro.config.Ini;
 import org.apache.shiro.util.CollectionUtils;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/core/src/main/java/org/apache/shiro/realm/text/PropertiesRealm.java b/core/src/main/java/org/apache/shiro/realm/text/PropertiesRealm.java
index 3e47193..3ced80f 100644
--- a/core/src/main/java/org/apache/shiro/realm/text/PropertiesRealm.java
+++ b/core/src/main/java/org/apache/shiro/realm/text/PropertiesRealm.java
@@ -18,9 +18,9 @@
  */
 package org.apache.shiro.realm.text;
 
-import org.apache.shiro.ShiroException;
-import org.apache.shiro.io.ResourceUtils;
-import org.apache.shiro.util.Destroyable;
+import org.apache.shiro.lang.ShiroException;
+import org.apache.shiro.lang.io.ResourceUtils;
+import org.apache.shiro.lang.util.Destroyable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/core/src/main/java/org/apache/shiro/realm/text/TextConfigurationRealm.java b/core/src/main/java/org/apache/shiro/realm/text/TextConfigurationRealm.java
index 2b9344d..84c74b6 100644
--- a/core/src/main/java/org/apache/shiro/realm/text/TextConfigurationRealm.java
+++ b/core/src/main/java/org/apache/shiro/realm/text/TextConfigurationRealm.java
@@ -24,7 +24,7 @@ import org.apache.shiro.authz.SimpleRole;
 import org.apache.shiro.config.ConfigurationException;
 import org.apache.shiro.realm.SimpleAccountRealm;
 import org.apache.shiro.util.PermissionUtils;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 
 import java.text.ParseException;
 import java.util.Collection;
diff --git a/core/src/main/java/org/apache/shiro/session/SessionException.java b/core/src/main/java/org/apache/shiro/session/SessionException.java
index 324172f..b83693d 100644
--- a/core/src/main/java/org/apache/shiro/session/SessionException.java
+++ b/core/src/main/java/org/apache/shiro/session/SessionException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.session;
 
-import org.apache.shiro.ShiroException;
+import org.apache.shiro.lang.ShiroException;
 
 
 /**
diff --git a/core/src/main/java/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.java b/core/src/main/java/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.java
index cdfeded..e6a1bb3 100644
--- a/core/src/main/java/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.java
+++ b/core/src/main/java/org/apache/shiro/session/mgt/AbstractValidatingSessionManager.java
@@ -23,8 +23,8 @@ import org.apache.shiro.session.ExpiredSessionException;
 import org.apache.shiro.session.InvalidSessionException;
 import org.apache.shiro.session.Session;
 import org.apache.shiro.session.UnknownSessionException;
-import org.apache.shiro.util.Destroyable;
-import org.apache.shiro.util.LifecycleUtils;
+import org.apache.shiro.lang.util.Destroyable;
+import org.apache.shiro.lang.util.LifecycleUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/core/src/main/java/org/apache/shiro/session/mgt/DefaultSessionContext.java b/core/src/main/java/org/apache/shiro/session/mgt/DefaultSessionContext.java
index 69c6409..2f08b2d 100644
--- a/core/src/main/java/org/apache/shiro/session/mgt/DefaultSessionContext.java
+++ b/core/src/main/java/org/apache/shiro/session/mgt/DefaultSessionContext.java
@@ -19,7 +19,7 @@
 package org.apache.shiro.session.mgt;
 
 import org.apache.shiro.util.MapContext;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 
 import java.io.Serializable;
 import java.util.Map;
diff --git a/core/src/main/java/org/apache/shiro/subject/ExecutionException.java b/core/src/main/java/org/apache/shiro/subject/ExecutionException.java
index e4898ca..7802dfb 100644
--- a/core/src/main/java/org/apache/shiro/subject/ExecutionException.java
+++ b/core/src/main/java/org/apache/shiro/subject/ExecutionException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.subject;
 
-import org.apache.shiro.ShiroException;
+import org.apache.shiro.lang.ShiroException;
 
 /**
  * Exception wrapping any potential checked exception thrown when a {@code Subject} executes a
diff --git a/core/src/main/java/org/apache/shiro/subject/SimplePrincipalCollection.java b/core/src/main/java/org/apache/shiro/subject/SimplePrincipalCollection.java
index 15d4a0e..080c831 100644
--- a/core/src/main/java/org/apache/shiro/subject/SimplePrincipalCollection.java
+++ b/core/src/main/java/org/apache/shiro/subject/SimplePrincipalCollection.java
@@ -19,7 +19,7 @@
 package org.apache.shiro.subject;
 
 import org.apache.shiro.util.CollectionUtils;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 
 import java.io.IOException;
 import java.io.ObjectInputStream;
diff --git a/core/src/main/java/org/apache/shiro/subject/Subject.java b/core/src/main/java/org/apache/shiro/subject/Subject.java
index 56fd339..346b22e 100644
--- a/core/src/main/java/org/apache/shiro/subject/Subject.java
+++ b/core/src/main/java/org/apache/shiro/subject/Subject.java
@@ -27,7 +27,7 @@ import org.apache.shiro.mgt.SecurityManager;
 import org.apache.shiro.mgt.SubjectFactory;
 import org.apache.shiro.session.Session;
 import org.apache.shiro.subject.support.DefaultSubjectContext;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 
 import java.io.Serializable;
 import java.util.Collection;
diff --git a/core/src/main/java/org/apache/shiro/subject/support/DefaultSubjectContext.java b/core/src/main/java/org/apache/shiro/subject/support/DefaultSubjectContext.java
index 5ae7309..5e88825 100644
--- a/core/src/main/java/org/apache/shiro/subject/support/DefaultSubjectContext.java
+++ b/core/src/main/java/org/apache/shiro/subject/support/DefaultSubjectContext.java
@@ -29,7 +29,7 @@ import org.apache.shiro.subject.PrincipalCollection;
 import org.apache.shiro.subject.Subject;
 import org.apache.shiro.subject.SubjectContext;
 import org.apache.shiro.util.MapContext;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/core/src/main/java/org/apache/shiro/subject/support/DelegatingSubject.java b/core/src/main/java/org/apache/shiro/subject/support/DelegatingSubject.java
index 406bec4..5581b7a 100644
--- a/core/src/main/java/org/apache/shiro/subject/support/DelegatingSubject.java
+++ b/core/src/main/java/org/apache/shiro/subject/support/DelegatingSubject.java
@@ -35,7 +35,7 @@ import org.apache.shiro.subject.ExecutionException;
 import org.apache.shiro.subject.PrincipalCollection;
 import org.apache.shiro.subject.Subject;
 import org.apache.shiro.util.CollectionUtils;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/core/src/main/java/org/apache/shiro/util/AbstractFactory.java b/core/src/main/java/org/apache/shiro/util/AbstractFactory.java
index 52dcce7..09e7e48 100644
--- a/core/src/main/java/org/apache/shiro/util/AbstractFactory.java
+++ b/core/src/main/java/org/apache/shiro/util/AbstractFactory.java
@@ -18,6 +18,8 @@
  */
 package org.apache.shiro.util;
 
+import org.apache.shiro.lang.util.Factory;
+
 /**
  * TODO - Class JavaDoc
  *
diff --git a/core/src/main/java/org/apache/shiro/util/AntPathMatcher.java b/core/src/main/java/org/apache/shiro/util/AntPathMatcher.java
index f33f85e..4ba0695 100644
--- a/core/src/main/java/org/apache/shiro/util/AntPathMatcher.java
+++ b/core/src/main/java/org/apache/shiro/util/AntPathMatcher.java
@@ -18,6 +18,8 @@
  */
 package org.apache.shiro.util;
 
+import org.apache.shiro.lang.util.StringUtils;
+
 /**
  * <p>PathMatcher implementation for Ant-style path patterns.
  * Examples are provided below.</p>
diff --git a/core/src/main/java/org/apache/shiro/util/PatternMatcher.java b/core/src/main/java/org/apache/shiro/util/PatternMatcher.java
index c1761a7..436f693 100644
--- a/core/src/main/java/org/apache/shiro/util/PatternMatcher.java
+++ b/core/src/main/java/org/apache/shiro/util/PatternMatcher.java
@@ -24,7 +24,7 @@ package org.apache.shiro.util;
  * Different implementations can support different pattern types, for example, Ant style path expressions, or
  * regular expressions, or other types of text based patterns.
  *
- * @see org.apache.shiro.util.AntPathMatcher AntPathMatcher
+ * @see org.apache.shiro.lang.util.AntPathMatcher AntPathMatcher
  * @since 0.9 RC2
  */
 public interface PatternMatcher {
diff --git a/core/src/main/java/org/apache/shiro/util/PermissionUtils.java b/core/src/main/java/org/apache/shiro/util/PermissionUtils.java
index 5f6134d..682d5a9 100644
--- a/core/src/main/java/org/apache/shiro/util/PermissionUtils.java
+++ b/core/src/main/java/org/apache/shiro/util/PermissionUtils.java
@@ -20,6 +20,7 @@ package org.apache.shiro.util;
 
 import org.apache.shiro.authz.Permission;
 import org.apache.shiro.authz.permission.PermissionResolver;
+import org.apache.shiro.lang.util.StringUtils;
 
 import java.util.Arrays;
 import java.util.Collection;
diff --git a/core/src/test/groovy/org/apache/shiro/config/IniSecurityManagerFactoryTest.groovy b/core/src/test/groovy/org/apache/shiro/config/IniSecurityManagerFactoryTest.groovy
index 750cf0c..5e9a443 100644
--- a/core/src/test/groovy/org/apache/shiro/config/IniSecurityManagerFactoryTest.groovy
+++ b/core/src/test/groovy/org/apache/shiro/config/IniSecurityManagerFactoryTest.groovy
@@ -23,6 +23,7 @@ import org.apache.shiro.authc.UsernamePasswordToken
 import org.apache.shiro.cache.Cache
 import org.apache.shiro.cache.MapCache
 import org.apache.shiro.crypto.hash.Sha256Hash
+import org.apache.shiro.ini.IniSecurityManagerFactory
 import org.apache.shiro.mgt.DefaultSecurityManager
 import org.apache.shiro.mgt.SecurityManager
 import org.apache.shiro.realm.Realm
diff --git a/core/src/test/groovy/org/apache/shiro/config/event/LoggingBeanEventListenerTest.groovy b/core/src/test/groovy/org/apache/shiro/config/ogdl/event/LoggingBeanEventListenerTest.groovy
similarity index 97%
rename from core/src/test/groovy/org/apache/shiro/config/event/LoggingBeanEventListenerTest.groovy
rename to core/src/test/groovy/org/apache/shiro/config/ogdl/event/LoggingBeanEventListenerTest.groovy
index 2d37f99..b890a74 100644
--- a/core/src/test/groovy/org/apache/shiro/config/event/LoggingBeanEventListenerTest.groovy
+++ b/core/src/test/groovy/org/apache/shiro/config/ogdl/event/LoggingBeanEventListenerTest.groovy
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.config.event
+package org.apache.shiro.config.ogdl.event
 
 import org.junit.Test
 
diff --git a/core/src/test/groovy/org/apache/shiro/codec/H64Test.groovy b/core/src/test/groovy/org/apache/shiro/lang/codec/H64Test.groovy
similarity index 97%
rename from core/src/test/groovy/org/apache/shiro/codec/H64Test.groovy
rename to core/src/test/groovy/org/apache/shiro/lang/codec/H64Test.groovy
index 765de80..d671bed 100644
--- a/core/src/test/groovy/org/apache/shiro/codec/H64Test.groovy
+++ b/core/src/test/groovy/org/apache/shiro/lang/codec/H64Test.groovy
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.codec
+package org.apache.shiro.lang.codec
 
 import org.apache.shiro.crypto.SecureRandomNumberGenerator
 import org.junit.Test
diff --git a/core/src/test/groovy/org/apache/shiro/realm/AuthenticatingRealmIntegrationTest.groovy b/core/src/test/groovy/org/apache/shiro/realm/AuthenticatingRealmIntegrationTest.groovy
index 26ead7f..1fb0f23 100644
--- a/core/src/test/groovy/org/apache/shiro/realm/AuthenticatingRealmIntegrationTest.groovy
+++ b/core/src/test/groovy/org/apache/shiro/realm/AuthenticatingRealmIntegrationTest.groovy
@@ -21,7 +21,7 @@ package org.apache.shiro.realm
 import org.apache.shiro.authc.AuthenticationToken
 import org.apache.shiro.authc.UsernamePasswordToken
 import org.apache.shiro.config.Ini
-import org.apache.shiro.config.IniSecurityManagerFactory
+import org.apache.shiro.ini.IniSecurityManagerFactory
 import org.apache.shiro.mgt.SecurityManager
 import org.apache.shiro.subject.Subject
 import org.junit.Test
diff --git a/core/src/test/java/org/apache/shiro/ExceptionTest.java b/core/src/test/java/org/apache/shiro/ExceptionTest.java
index 2fb76e3..3832f98 100644
--- a/core/src/test/java/org/apache/shiro/ExceptionTest.java
+++ b/core/src/test/java/org/apache/shiro/ExceptionTest.java
@@ -19,7 +19,7 @@
 package org.apache.shiro;
 
 import junit.framework.TestCase;
-import org.apache.shiro.util.ClassUtils;
+import org.apache.shiro.lang.util.ClassUtils;
 import org.junit.Test;
 
 
diff --git a/core/src/test/java/org/apache/shiro/authc/credential/AbstractHashedCredentialsMatcherTest.java b/core/src/test/java/org/apache/shiro/authc/credential/AbstractHashedCredentialsMatcherTest.java
index 2507895..dba089c 100644
--- a/core/src/test/java/org/apache/shiro/authc/credential/AbstractHashedCredentialsMatcherTest.java
+++ b/core/src/test/java/org/apache/shiro/authc/credential/AbstractHashedCredentialsMatcherTest.java
@@ -26,7 +26,7 @@ import org.apache.shiro.authc.AuthenticationToken;
 import org.apache.shiro.authc.SimpleAuthenticationInfo;
 import org.apache.shiro.authc.UsernamePasswordToken;
 import org.apache.shiro.crypto.hash.AbstractHash;
-import org.apache.shiro.util.ClassUtils;
+import org.apache.shiro.lang.util.ClassUtils;
 
 /**
  * @since Jun 10, 2008 4:47:09 PM
diff --git a/core/src/test/java/org/apache/shiro/authc/credential/HashedCredentialsMatcherTest.java b/core/src/test/java/org/apache/shiro/authc/credential/HashedCredentialsMatcherTest.java
index caf93a0..6c9891f 100644
--- a/core/src/test/java/org/apache/shiro/authc/credential/HashedCredentialsMatcherTest.java
+++ b/core/src/test/java/org/apache/shiro/authc/credential/HashedCredentialsMatcherTest.java
@@ -26,7 +26,7 @@ import org.apache.shiro.crypto.SecureRandomNumberGenerator;
 import org.apache.shiro.crypto.hash.Sha1Hash;
 import org.apache.shiro.subject.PrincipalCollection;
 import org.apache.shiro.subject.SimplePrincipalCollection;
-import org.apache.shiro.util.ByteSource;
+import org.apache.shiro.lang.util.ByteSource;
 import org.junit.Test;
 
 import static org.junit.Assert.assertTrue;
diff --git a/core/src/test/java/org/apache/shiro/io/SerializationExceptionTest.java b/core/src/test/java/org/apache/shiro/lang/io/SerializationExceptionTest.java
similarity index 96%
rename from core/src/test/java/org/apache/shiro/io/SerializationExceptionTest.java
rename to core/src/test/java/org/apache/shiro/lang/io/SerializationExceptionTest.java
index 8321caf..29340fe 100644
--- a/core/src/test/java/org/apache/shiro/io/SerializationExceptionTest.java
+++ b/core/src/test/java/org/apache/shiro/lang/io/SerializationExceptionTest.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.io;
+package org.apache.shiro.lang.io;
 
 import org.apache.shiro.ExceptionTest;
 
diff --git a/core/src/test/java/org/apache/shiro/realm/jdbc/JDBCRealmTest.java b/core/src/test/java/org/apache/shiro/realm/jdbc/JDBCRealmTest.java
index 49a8a4a..7a485e3 100644
--- a/core/src/test/java/org/apache/shiro/realm/jdbc/JDBCRealmTest.java
+++ b/core/src/test/java/org/apache/shiro/realm/jdbc/JDBCRealmTest.java
@@ -22,10 +22,10 @@ import org.apache.shiro.SecurityUtils;
 import org.apache.shiro.authc.AuthenticationException;
 import org.apache.shiro.authc.IncorrectCredentialsException;
 import org.apache.shiro.authc.UsernamePasswordToken;
-import org.apache.shiro.codec.Base64;
-import org.apache.shiro.codec.CodecSupport;
+import org.apache.shiro.lang.codec.Base64;
+import org.apache.shiro.lang.codec.CodecSupport;
 import org.apache.shiro.config.Ini;
-import org.apache.shiro.config.IniSecurityManagerFactory;
+import org.apache.shiro.ini.IniSecurityManagerFactory;
 import org.apache.shiro.crypto.hash.Sha256Hash;
 import org.apache.shiro.mgt.DefaultSecurityManager;
 import org.apache.shiro.realm.AuthorizingRealm;
diff --git a/core/src/test/java/org/apache/shiro/subject/DelegatingSubjectTest.java b/core/src/test/java/org/apache/shiro/subject/DelegatingSubjectTest.java
index 117cf87..ee04e6d 100644
--- a/core/src/test/java/org/apache/shiro/subject/DelegatingSubjectTest.java
+++ b/core/src/test/java/org/apache/shiro/subject/DelegatingSubjectTest.java
@@ -21,13 +21,12 @@ package org.apache.shiro.subject;
 import org.apache.shiro.SecurityUtils;
 import org.apache.shiro.authc.UsernamePasswordToken;
 import org.apache.shiro.config.Ini;
-import org.apache.shiro.config.IniSecurityManagerFactory;
+import org.apache.shiro.ini.IniSecurityManagerFactory;
 import org.apache.shiro.mgt.DefaultSecurityManager;
 import org.apache.shiro.mgt.SecurityManager;
 import org.apache.shiro.session.Session;
 import org.apache.shiro.subject.support.DelegatingSubject;
-import org.apache.shiro.util.CollectionUtils;
-import org.apache.shiro.util.LifecycleUtils;
+import org.apache.shiro.lang.util.LifecycleUtils;
 import org.apache.shiro.util.ThreadContext;
 import org.junit.After;
 import org.junit.Before;
diff --git a/core/src/test/java/org/apache/shiro/test/AbstractShiroTest.java b/core/src/test/java/org/apache/shiro/test/AbstractShiroTest.java
index f58f4df..0a3f642 100644
--- a/core/src/test/java/org/apache/shiro/test/AbstractShiroTest.java
+++ b/core/src/test/java/org/apache/shiro/test/AbstractShiroTest.java
@@ -23,7 +23,7 @@ import org.apache.shiro.UnavailableSecurityManagerException;
 import org.apache.shiro.mgt.SecurityManager;
 import org.apache.shiro.subject.Subject;
 import org.apache.shiro.subject.support.SubjectThreadState;
-import org.apache.shiro.util.LifecycleUtils;
+import org.apache.shiro.lang.util.LifecycleUtils;
 import org.apache.shiro.util.ThreadState;
 import org.junit.AfterClass;
 
diff --git a/core/src/test/java/org/apache/shiro/test/ExampleShiroIntegrationTest.java b/core/src/test/java/org/apache/shiro/test/ExampleShiroIntegrationTest.java
index 17f94e7..8b106fb 100644
--- a/core/src/test/java/org/apache/shiro/test/ExampleShiroIntegrationTest.java
+++ b/core/src/test/java/org/apache/shiro/test/ExampleShiroIntegrationTest.java
@@ -18,10 +18,10 @@
  */
 package org.apache.shiro.test;
 
-import org.apache.shiro.config.IniSecurityManagerFactory;
+import org.apache.shiro.ini.IniSecurityManagerFactory;
 import org.apache.shiro.mgt.SecurityManager;
 import org.apache.shiro.subject.Subject;
-import org.apache.shiro.util.Factory;
+import org.apache.shiro.lang.util.Factory;
 import org.junit.After;
 import org.junit.BeforeClass;
 import org.junit.Test;
diff --git a/core/src/test/java/org/apache/shiro/test/SecurityManagerTestSupport.java b/core/src/test/java/org/apache/shiro/test/SecurityManagerTestSupport.java
index 3cc47bd..8b3f3a6 100644
--- a/core/src/test/java/org/apache/shiro/test/SecurityManagerTestSupport.java
+++ b/core/src/test/java/org/apache/shiro/test/SecurityManagerTestSupport.java
@@ -24,7 +24,7 @@ import org.apache.shiro.mgt.DefaultSecurityManager;
 import org.apache.shiro.mgt.SecurityManager;
 import org.apache.shiro.realm.text.IniRealm;
 import org.apache.shiro.subject.Subject;
-import org.apache.shiro.util.LifecycleUtils;
+import org.apache.shiro.lang.util.LifecycleUtils;
 import org.apache.shiro.util.ThreadContext;
 import org.junit.After;
 import org.junit.Before;
diff --git a/core/src/test/java/org/apache/shiro/util/StringUtilsTest.java b/core/src/test/java/org/apache/shiro/util/StringUtilsTest.java
index 99873a5..e6c447a 100644
--- a/core/src/test/java/org/apache/shiro/util/StringUtilsTest.java
+++ b/core/src/test/java/org/apache/shiro/util/StringUtilsTest.java
@@ -19,6 +19,8 @@
 package org.apache.shiro.util;
 
 import static org.junit.Assert.*;
+
+import org.apache.shiro.lang.util.StringUtils;
 import org.junit.Test;
 
 
diff --git a/crypto/cipher/pom.xml b/crypto/cipher/pom.xml
index 559624b..72974d4 100644
--- a/crypto/cipher/pom.xml
+++ b/crypto/cipher/pom.xml
@@ -40,9 +40,10 @@
                 <configuration>
                     <instructions>
                         <Bundle-SymbolicName>org.apache.shiro.crypto.cipher</Bundle-SymbolicName>
-                        <Export-Package>org.apache.shiro.crypto.*;version=${project.version}</Export-Package>
+                        <Export-Package>org.apache.shiro.crypto.cipher.*;version=${project.version}</Export-Package>
                         <Import-Package>
-                            org.apache.shiro.crypto**;version="${shiro.osgi.importRange}",
+                            org.apache.shiro.crypto*;version="${shiro.osgi.importRange}",
+                            org.apache.shiro.lang*;version="${shiro.osgi.importRange}",
                             *
                         </Import-Package>
                     </instructions>
diff --git a/crypto/cipher/src/main/java/org/apache/shiro/crypto/AbstractSymmetricCipherService.java b/crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/AbstractSymmetricCipherService.java
similarity index 98%
rename from crypto/cipher/src/main/java/org/apache/shiro/crypto/AbstractSymmetricCipherService.java
rename to crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/AbstractSymmetricCipherService.java
index bde36a0..05c7273 100644
--- a/crypto/cipher/src/main/java/org/apache/shiro/crypto/AbstractSymmetricCipherService.java
+++ b/crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/AbstractSymmetricCipherService.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.crypto;
+package org.apache.shiro.crypto.cipher;
 
 import javax.crypto.KeyGenerator;
 import java.security.Key;
diff --git a/crypto/cipher/src/main/java/org/apache/shiro/crypto/AesCipherService.java b/crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/AesCipherService.java
similarity index 99%
rename from crypto/cipher/src/main/java/org/apache/shiro/crypto/AesCipherService.java
rename to crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/AesCipherService.java
index c1cd209..f8c63b1 100644
--- a/crypto/cipher/src/main/java/org/apache/shiro/crypto/AesCipherService.java
+++ b/crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/AesCipherService.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.crypto;
+package org.apache.shiro.crypto.cipher;
 
 import javax.crypto.spec.GCMParameterSpec;
 import java.security.spec.AlgorithmParameterSpec;
diff --git a/crypto/cipher/src/main/java/org/apache/shiro/crypto/BlowfishCipherService.java b/crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/BlowfishCipherService.java
similarity index 99%
rename from crypto/cipher/src/main/java/org/apache/shiro/crypto/BlowfishCipherService.java
rename to crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/BlowfishCipherService.java
index 449874b..894193d 100644
--- a/crypto/cipher/src/main/java/org/apache/shiro/crypto/BlowfishCipherService.java
+++ b/crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/BlowfishCipherService.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.crypto;
+package org.apache.shiro.crypto.cipher;
 
 /**
  * {@code CipherService} using the {@code Blowfish} cipher algorithm for all encryption, decryption, and key operations.
diff --git a/crypto/cipher/src/main/java/org/apache/shiro/crypto/CipherService.java b/crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/CipherService.java
similarity index 98%
rename from crypto/cipher/src/main/java/org/apache/shiro/crypto/CipherService.java
rename to crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/CipherService.java
index 8dda1ac..cd3ebf6 100644
--- a/crypto/cipher/src/main/java/org/apache/shiro/crypto/CipherService.java
+++ b/crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/CipherService.java
@@ -16,9 +16,10 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.crypto;
+package org.apache.shiro.crypto.cipher;
 
-import org.apache.shiro.util.ByteSource;
+import org.apache.shiro.crypto.CryptoException;
+import org.apache.shiro.lang.util.ByteSource;
 
 import java.io.InputStream;
 import java.io.OutputStream;
diff --git a/crypto/cipher/src/main/java/org/apache/shiro/crypto/DefaultBlockCipherService.java b/crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/DefaultBlockCipherService.java
similarity index 99%
rename from crypto/cipher/src/main/java/org/apache/shiro/crypto/DefaultBlockCipherService.java
rename to crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/DefaultBlockCipherService.java
index 0860397..36280af 100644
--- a/crypto/cipher/src/main/java/org/apache/shiro/crypto/DefaultBlockCipherService.java
+++ b/crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/DefaultBlockCipherService.java
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.crypto;
+package org.apache.shiro.crypto.cipher;
 
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 
 /**
  * Base abstract class for block cipher algorithms.
@@ -70,7 +70,7 @@ import org.apache.shiro.util.StringUtils;
  * {@link OperationMode#CBC CBC} mode, specifically to support auto-generation of initialization vectors during
  * encryption.  This is different than the JDK's default {@link OperationMode#ECB ECB} mode because {@code ECB} does
  * not support initialization vectors, which are necessary for strong encryption.  See  the
- * {@link org.apache.shiro.crypto.JcaCipherService JcaCipherService parent class} class JavaDoc for an extensive
+ * {@link JcaCipherService JcaCipherService parent class} class JavaDoc for an extensive
  * explanation on why we do this and why we do not use the Sun {@code ECB} default.  You also might also want read
  * the <a href="http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Electronic_codebook_.28ECB.29">Wikipedia
  * section on ECB<a/> and look at the encrypted image to see an example of why {@code ECB} should not be used in
@@ -100,7 +100,7 @@ import org.apache.shiro.util.StringUtils;
  * <p/>
  * <b>*</b>If no padding scheme is specified, this class defaults to the {@link PaddingScheme#PKCS5} scheme, specifically
  * to be compliant with the default behavior of auto-generating initialization vectors during encryption (see the
- * {@link org.apache.shiro.crypto.JcaCipherService JcaCipherService parent class} class JavaDoc for why).
+ * {@link JcaCipherService JcaCipherService parent class} class JavaDoc for why).
  * <p/>
  * In the rare case that you need to override the default with a scheme not represented by the {@link PaddingScheme}
  * enum, you may specify the raw padding scheme name string that will be recognized by your JCA provider via the
diff --git a/crypto/cipher/src/main/java/org/apache/shiro/crypto/JcaCipherService.java b/crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/JcaCipherService.java
similarity index 99%
rename from crypto/cipher/src/main/java/org/apache/shiro/crypto/JcaCipherService.java
rename to crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/JcaCipherService.java
index a308471..61da83d 100644
--- a/crypto/cipher/src/main/java/org/apache/shiro/crypto/JcaCipherService.java
+++ b/crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/JcaCipherService.java
@@ -16,10 +16,11 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.crypto;
+package org.apache.shiro.crypto.cipher;
 
-import org.apache.shiro.util.ByteSource;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.crypto.CryptoException;
+import org.apache.shiro.lang.util.ByteSource;
+import org.apache.shiro.lang.util.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/crypto/cipher/src/main/java/org/apache/shiro/crypto/OperationMode.java b/crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/OperationMode.java
similarity index 99%
rename from crypto/cipher/src/main/java/org/apache/shiro/crypto/OperationMode.java
rename to crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/OperationMode.java
index 3ac56ab..4794dad 100644
--- a/crypto/cipher/src/main/java/org/apache/shiro/crypto/OperationMode.java
+++ b/crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/OperationMode.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.crypto;
+package org.apache.shiro.crypto.cipher;
 
 /**
  * A cipher <a href="http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation">mode of operation</a>
diff --git a/crypto/cipher/src/main/java/org/apache/shiro/crypto/PaddingScheme.java b/crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/PaddingScheme.java
similarity index 99%
rename from crypto/cipher/src/main/java/org/apache/shiro/crypto/PaddingScheme.java
rename to crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/PaddingScheme.java
index 0cc1e0e..2d7264c 100644
--- a/crypto/cipher/src/main/java/org/apache/shiro/crypto/PaddingScheme.java
+++ b/crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/PaddingScheme.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.crypto;
+package org.apache.shiro.crypto.cipher;
 
 /**
  * A {@code CipherPaddingScheme} represents well-known
diff --git a/crypto/cipher/src/main/java/org/apache/shiro/crypto/package-info.java b/crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/package-info.java
similarity index 91%
rename from crypto/cipher/src/main/java/org/apache/shiro/crypto/package-info.java
rename to crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/package-info.java
index f84853d..b749f90 100644
--- a/crypto/cipher/src/main/java/org/apache/shiro/crypto/package-info.java
+++ b/crypto/cipher/src/main/java/org/apache/shiro/crypto/cipher/package-info.java
@@ -20,7 +20,7 @@
  * Cryptography Cipher and Hashing components that greatly simplify the JDK's cryptography concepts and
  * add additional convenient behavior.
  * <p/>
- * The most important interface in this package is the {@link org.apache.shiro.crypto.CipherService CipherService}
+ * The most important interface in this package is the {@link org.apache.shiro.crypto.cipher.CipherService CipherService}
  * interface, which allows one to encrypt and decrypt sensitive data.
  */
-package org.apache.shiro.crypto;
+package org.apache.shiro.crypto.cipher;
diff --git a/crypto/cipher/src/test/groovy/org/apache/shiro/crypto/AesCipherServiceTest.groovy b/crypto/cipher/src/test/groovy/org/apache/shiro/crypto/cipher/AesCipherServiceTest.groovy
similarity index 97%
rename from crypto/cipher/src/test/groovy/org/apache/shiro/crypto/AesCipherServiceTest.groovy
rename to crypto/cipher/src/test/groovy/org/apache/shiro/crypto/cipher/AesCipherServiceTest.groovy
index 3d49b86..2ab0d43 100644
--- a/crypto/cipher/src/test/groovy/org/apache/shiro/crypto/AesCipherServiceTest.groovy
+++ b/crypto/cipher/src/test/groovy/org/apache/shiro/crypto/cipher/AesCipherServiceTest.groovy
@@ -16,7 +16,8 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.crypto
+package org.apache.shiro.crypto.cipher
+
 
 import org.bouncycastle.jce.provider.BouncyCastleProvider
 
@@ -24,8 +25,8 @@ import java.security.Security
 
 import static org.junit.Assert.*;
 
-import org.apache.shiro.codec.CodecSupport
-import org.apache.shiro.util.ByteSource
+import org.apache.shiro.lang.codec.CodecSupport
+import org.apache.shiro.lang.util.ByteSource
 import org.junit.Test
 
 /**
diff --git a/crypto/cipher/src/test/groovy/org/apache/shiro/crypto/BlowfishCipherServiceTest.groovy b/crypto/cipher/src/test/groovy/org/apache/shiro/crypto/cipher/BlowfishCipherServiceTest.groovy
similarity index 92%
rename from crypto/cipher/src/test/groovy/org/apache/shiro/crypto/BlowfishCipherServiceTest.groovy
rename to crypto/cipher/src/test/groovy/org/apache/shiro/crypto/cipher/BlowfishCipherServiceTest.groovy
index 2e90b42..d3f2c3a 100644
--- a/crypto/cipher/src/test/groovy/org/apache/shiro/crypto/BlowfishCipherServiceTest.groovy
+++ b/crypto/cipher/src/test/groovy/org/apache/shiro/crypto/cipher/BlowfishCipherServiceTest.groovy
@@ -16,16 +16,16 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.crypto
+package org.apache.shiro.crypto.cipher
 
-import org.apache.shiro.codec.CodecSupport
-import org.apache.shiro.util.ByteSource
+import org.apache.shiro.lang.codec.CodecSupport
+import org.apache.shiro.lang.util.ByteSource
 import org.junit.Test
 
 import static org.junit.Assert.assertTrue
 
 /**
- * Test cases for the {@link BlowfishCipherService} class.
+ * Test cases for the {@link org.apache.shiro.crypto.cipher.BlowfishCipherService} class.
  *
  * @since 1.0
  */
diff --git a/crypto/cipher/src/test/groovy/org/apache/shiro/crypto/JcaCipherServiceTest.groovy b/crypto/cipher/src/test/groovy/org/apache/shiro/crypto/cipher/JcaCipherServiceTest.groovy
similarity index 89%
rename from crypto/cipher/src/test/groovy/org/apache/shiro/crypto/JcaCipherServiceTest.groovy
rename to crypto/cipher/src/test/groovy/org/apache/shiro/crypto/cipher/JcaCipherServiceTest.groovy
index f9998f9..d9fd669 100644
--- a/crypto/cipher/src/test/groovy/org/apache/shiro/crypto/JcaCipherServiceTest.groovy
+++ b/crypto/cipher/src/test/groovy/org/apache/shiro/crypto/cipher/JcaCipherServiceTest.groovy
@@ -16,8 +16,10 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.crypto
+package org.apache.shiro.crypto.cipher
 
+import org.apache.shiro.crypto.CryptoException
+import org.apache.shiro.crypto.cipher.JcaCipherService
 import org.junit.Test;
 
 public class JcaCipherServiceTest {
diff --git a/crypto/core/pom.xml b/crypto/core/pom.xml
index 7297b58..2733ceb 100644
--- a/crypto/core/pom.xml
+++ b/crypto/core/pom.xml
@@ -42,7 +42,7 @@
                         <Bundle-SymbolicName>org.apache.shiro.crypto.core</Bundle-SymbolicName>
                         <Export-Package>org.apache.shiro.crypto*;version=${project.version}</Export-Package>
                         <Import-Package>
-                            org.apache.shiro.crypto*;version="${shiro.osgi.importRange}",
+                            org.apache.shiro.lang*;version="${shiro.osgi.importRange}",
                             *
                         </Import-Package>
                     </instructions>
diff --git a/crypto/core/src/main/java/org/apache/shiro/crypto/CryptoException.java b/crypto/core/src/main/java/org/apache/shiro/crypto/CryptoException.java
index a7e6c67..477d97f 100644
--- a/crypto/core/src/main/java/org/apache/shiro/crypto/CryptoException.java
+++ b/crypto/core/src/main/java/org/apache/shiro/crypto/CryptoException.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.crypto;
 
-import org.apache.shiro.ShiroException;
+import org.apache.shiro.lang.ShiroException;
 
 /**
  * Base Shiro exception for problems encountered during cryptographic operations.
diff --git a/crypto/core/src/main/java/org/apache/shiro/crypto/RandomNumberGenerator.java b/crypto/core/src/main/java/org/apache/shiro/crypto/RandomNumberGenerator.java
index 4358537..080d2f7 100644
--- a/crypto/core/src/main/java/org/apache/shiro/crypto/RandomNumberGenerator.java
+++ b/crypto/core/src/main/java/org/apache/shiro/crypto/RandomNumberGenerator.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.crypto;
 
-import org.apache.shiro.util.ByteSource;
+import org.apache.shiro.lang.util.ByteSource;
 
 /**
  * A component that can generate random number/byte values as needed.  Useful in cryptography or security scenarios
@@ -33,8 +33,8 @@ import org.apache.shiro.util.ByteSource;
  * <li>Default per-instance behavior can be customized on implementations, typically via JavaBeans mutators.</li>
  * <li>Perhaps most important for Shiro end-users, tt can more easily be used as a source of cryptographic seed data,
  * and the data returned is already in a more convenient {@link ByteSource ByteSource} format in case that data needs
- * to be {@link org.apache.shiro.util.ByteSource#toHex() hex} or
- * {@link org.apache.shiro.util.ByteSource#toBase64() base64}-encoded.</li>
+ * to be {@link org.apache.shiro.lang.util.ByteSource#toHex() hex} or
+ * {@link org.apache.shiro.lang.util.ByteSource#toBase64() base64}-encoded.</li>
  * </ul>
  * For example, consider the following example generating password salts for new user accounts:
  * <pre>
diff --git a/crypto/core/src/main/java/org/apache/shiro/crypto/SecureRandomNumberGenerator.java b/crypto/core/src/main/java/org/apache/shiro/crypto/SecureRandomNumberGenerator.java
index 5c132d0..8bcb0f5 100644
--- a/crypto/core/src/main/java/org/apache/shiro/crypto/SecureRandomNumberGenerator.java
+++ b/crypto/core/src/main/java/org/apache/shiro/crypto/SecureRandomNumberGenerator.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.crypto;
 
-import org.apache.shiro.util.ByteSource;
+import org.apache.shiro.lang.util.ByteSource;
 
 import java.security.SecureRandom;
 
diff --git a/crypto/core/src/test/groovy/org/apache/shiro/crypto/SecureRandomNumberGeneratorTest.groovy b/crypto/core/src/test/groovy/org/apache/shiro/crypto/SecureRandomNumberGeneratorTest.groovy
index 892a51c..e56283d 100644
--- a/crypto/core/src/test/groovy/org/apache/shiro/crypto/SecureRandomNumberGeneratorTest.groovy
+++ b/crypto/core/src/test/groovy/org/apache/shiro/crypto/SecureRandomNumberGeneratorTest.groovy
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.crypto
 
-import org.apache.shiro.util.ByteSource;
+import org.apache.shiro.lang.util.ByteSource;
 import org.junit.Test;
 
 import static org.junit.Assert.*;
diff --git a/crypto/hash/pom.xml b/crypto/hash/pom.xml
index 17b9deb..6526345 100644
--- a/crypto/hash/pom.xml
+++ b/crypto/hash/pom.xml
@@ -42,7 +42,8 @@
                         <Bundle-SymbolicName>org.apache.shiro.crypto.hash</Bundle-SymbolicName>
                         <Export-Package>org.apache.shiro.crypto.hash*;version=${project.version}</Export-Package>
                         <Import-Package>
-                            org.apache.shiro.crypto.core*;version="${shiro.osgi.importRange}",
+                            org.apache.shiro.crypto*;version="${shiro.osgi.importRange}",
+                            org.apache.shiro.lang*;version="${shiro.osgi.importRange}",
                             *
                         </Import-Package>
                     </instructions>
diff --git a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/AbstractHash.java b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/AbstractHash.java
index 27e13dc..4bf8373 100644
--- a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/AbstractHash.java
+++ b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/AbstractHash.java
@@ -18,10 +18,10 @@
  */
 package org.apache.shiro.crypto.hash;
 
-import org.apache.shiro.codec.Base64;
-import org.apache.shiro.codec.CodecException;
-import org.apache.shiro.codec.CodecSupport;
-import org.apache.shiro.codec.Hex;
+import org.apache.shiro.lang.codec.Base64;
+import org.apache.shiro.lang.codec.CodecException;
+import org.apache.shiro.lang.codec.CodecSupport;
+import org.apache.shiro.lang.codec.Hex;
 import org.apache.shiro.crypto.UnknownAlgorithmException;
 
 import java.io.Serializable;
@@ -114,7 +114,7 @@ public abstract class AbstractHash extends CodecSupport implements Hash, Seriali
      * By default, this class only supports Object method arguments of
      * type {@code byte[]}, {@code char[]}, {@link String}, {@link java.io.File File}, or
      * {@link java.io.InputStream InputStream}.  If either argument is anything other than these
-     * types a {@link org.apache.shiro.codec.CodecException CodecException} will be thrown.
+     * types a {@link org.apache.shiro.lang.codec.CodecException CodecException} will be thrown.
      * <p/>
      * If you want to be able to hash other object types, or use other salt types, you need to override the
      * {@link #toBytes(Object) toBytes(Object)} method to support those specific types.  Your other option is to
diff --git a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/ConfigurableHashService.java b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/ConfigurableHashService.java
index 38c8b46..fd7883f 100644
--- a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/ConfigurableHashService.java
+++ b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/ConfigurableHashService.java
@@ -19,7 +19,7 @@
 package org.apache.shiro.crypto.hash;
 
 import org.apache.shiro.crypto.RandomNumberGenerator;
-import org.apache.shiro.util.ByteSource;
+import org.apache.shiro.lang.util.ByteSource;
 
 /**
  * A {@code HashService} that allows configuration of its strategy via JavaBeans-compatible setter methods.
diff --git a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/DefaultHashService.java b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/DefaultHashService.java
index c3bf2cc..486e19d 100644
--- a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/DefaultHashService.java
+++ b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/DefaultHashService.java
@@ -20,7 +20,7 @@ package org.apache.shiro.crypto.hash;
 
 import org.apache.shiro.crypto.RandomNumberGenerator;
 import org.apache.shiro.crypto.SecureRandomNumberGenerator;
-import org.apache.shiro.util.ByteSource;
+import org.apache.shiro.lang.util.ByteSource;
 
 /**
  * Default implementation of the {@link HashService} interface, supporting a customizable hash algorithm name,
diff --git a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Hash.java b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Hash.java
index 8760895..3e26928 100644
--- a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Hash.java
+++ b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Hash.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.crypto.hash;
 
-import org.apache.shiro.util.ByteSource;
+import org.apache.shiro.lang.util.ByteSource;
 
 /**
  * A Cryptographic {@code Hash} represents a one-way conversion algorithm that transforms an input source to an
diff --git a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/HashRequest.java b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/HashRequest.java
index 82376ed..79d3251 100644
--- a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/HashRequest.java
+++ b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/HashRequest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.crypto.hash;
 
-import org.apache.shiro.util.ByteSource;
+import org.apache.shiro.lang.util.ByteSource;
 
 /**
  * A {@code HashRequest} is composed of data that will be used by a {@link HashService} to compute a hash (aka
diff --git a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Md2Hash.java b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Md2Hash.java
index c4ae2ff..dbfb9cb 100644
--- a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Md2Hash.java
+++ b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Md2Hash.java
@@ -18,8 +18,8 @@
  */
 package org.apache.shiro.crypto.hash;
 
-import org.apache.shiro.codec.Base64;
-import org.apache.shiro.codec.Hex;
+import org.apache.shiro.lang.codec.Base64;
+import org.apache.shiro.lang.codec.Hex;
 
 
 /**
diff --git a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Md5Hash.java b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Md5Hash.java
index e7aa0b4..a83740a 100644
--- a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Md5Hash.java
+++ b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Md5Hash.java
@@ -18,8 +18,8 @@
  */
 package org.apache.shiro.crypto.hash;
 
-import org.apache.shiro.codec.Base64;
-import org.apache.shiro.codec.Hex;
+import org.apache.shiro.lang.codec.Base64;
+import org.apache.shiro.lang.codec.Hex;
 
 /**
  * Generates an MD5 Hash (RFC 1321) from a given input <tt>source</tt> with an optional <tt>salt</tt> and
diff --git a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Sha1Hash.java b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Sha1Hash.java
index 0acfdb9..e844b70 100644
--- a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Sha1Hash.java
+++ b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Sha1Hash.java
@@ -18,8 +18,8 @@
  */
 package org.apache.shiro.crypto.hash;
 
-import org.apache.shiro.codec.Base64;
-import org.apache.shiro.codec.Hex;
+import org.apache.shiro.lang.codec.Base64;
+import org.apache.shiro.lang.codec.Hex;
 
 
 /**
diff --git a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Sha256Hash.java b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Sha256Hash.java
index b600a15..7938469 100644
--- a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Sha256Hash.java
+++ b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Sha256Hash.java
@@ -18,8 +18,8 @@
  */
 package org.apache.shiro.crypto.hash;
 
-import org.apache.shiro.codec.Base64;
-import org.apache.shiro.codec.Hex;
+import org.apache.shiro.lang.codec.Base64;
+import org.apache.shiro.lang.codec.Hex;
 
 /**
  * Generates an SHA-256 Hash from a given input <tt>source</tt> with an optional <tt>salt</tt> and hash iterations.
diff --git a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Sha384Hash.java b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Sha384Hash.java
index 8af2fdf..9345bc6 100644
--- a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Sha384Hash.java
+++ b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Sha384Hash.java
@@ -18,8 +18,8 @@
  */
 package org.apache.shiro.crypto.hash;
 
-import org.apache.shiro.codec.Base64;
-import org.apache.shiro.codec.Hex;
+import org.apache.shiro.lang.codec.Base64;
+import org.apache.shiro.lang.codec.Hex;
 
 
 /**
diff --git a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Sha512Hash.java b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Sha512Hash.java
index 5eb285e..400f833 100644
--- a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Sha512Hash.java
+++ b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/Sha512Hash.java
@@ -18,8 +18,8 @@
  */
 package org.apache.shiro.crypto.hash;
 
-import org.apache.shiro.codec.Base64;
-import org.apache.shiro.codec.Hex;
+import org.apache.shiro.lang.codec.Base64;
+import org.apache.shiro.lang.codec.Hex;
 
 /**
  * Generates an SHA-512 Hash from a given input <tt>source</tt> with an optional <tt>salt</tt> and hash iterations.
diff --git a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/SimpleHash.java b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/SimpleHash.java
index dab8b4c..8c1fb6e 100644
--- a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/SimpleHash.java
+++ b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/SimpleHash.java
@@ -18,12 +18,12 @@
  */
 package org.apache.shiro.crypto.hash;
 
-import org.apache.shiro.codec.Base64;
-import org.apache.shiro.codec.CodecException;
-import org.apache.shiro.codec.Hex;
+import org.apache.shiro.lang.codec.Base64;
+import org.apache.shiro.lang.codec.CodecException;
+import org.apache.shiro.lang.codec.Hex;
 import org.apache.shiro.crypto.UnknownAlgorithmException;
-import org.apache.shiro.util.ByteSource;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.ByteSource;
+import org.apache.shiro.lang.util.StringUtils;
 
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
@@ -108,7 +108,7 @@ public class SimpleHash extends AbstractHash {
      * @param algorithmName the {@link java.security.MessageDigest MessageDigest} algorithm name to use when
      *                      performing the hash.
      * @param source        the object to be hashed.
-     * @throws org.apache.shiro.codec.CodecException
+     * @throws org.apache.shiro.lang.codec.CodecException
      *                                   if the specified {@code source} cannot be converted into a byte array (byte[]).
      * @throws UnknownAlgorithmException if the {@code algorithmName} is not available.
      */
@@ -145,8 +145,8 @@ public class SimpleHash extends AbstractHash {
      * <p/>
      * By default, this class only supports Object method arguments of
      * type {@code byte[]}, {@code char[]}, {@link String}, {@link java.io.File File},
-     * {@link java.io.InputStream InputStream} or {@link org.apache.shiro.util.ByteSource ByteSource}.  If either
-     * argument is anything other than these types a {@link org.apache.shiro.codec.CodecException CodecException}
+     * {@link java.io.InputStream InputStream} or {@link org.apache.shiro.lang.util.ByteSource ByteSource}.  If either
+     * argument is anything other than these types a {@link org.apache.shiro.lang.codec.CodecException CodecException}
      * will be thrown.
      * <p/>
      * If you want to be able to hash other object types, or use other salt types, you need to override the
diff --git a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/SimpleHashRequest.java b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/SimpleHashRequest.java
index 0e528a6..5423256 100644
--- a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/SimpleHashRequest.java
+++ b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/SimpleHashRequest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.crypto.hash;
 
-import org.apache.shiro.util.ByteSource;
+import org.apache.shiro.lang.util.ByteSource;
 
 /**
  * Simple implementation of {@link HashRequest} that can be used when interacting with a {@link HashService}.
diff --git a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.java b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.java
index 1eca5cc..34553d9 100644
--- a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.java
+++ b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.java
@@ -18,9 +18,9 @@
  */
 package org.apache.shiro.crypto.hash.format;
 
-import org.apache.shiro.util.ClassUtils;
-import org.apache.shiro.util.StringUtils;
-import org.apache.shiro.util.UnknownClassException;
+import org.apache.shiro.lang.util.ClassUtils;
+import org.apache.shiro.lang.util.StringUtils;
+import org.apache.shiro.lang.util.UnknownClassException;
 
 import java.util.HashMap;
 import java.util.HashSet;
diff --git a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/format/Shiro1CryptFormat.java b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/format/Shiro1CryptFormat.java
index 5f78828..24966ea 100644
--- a/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/format/Shiro1CryptFormat.java
+++ b/crypto/hash/src/main/java/org/apache/shiro/crypto/hash/format/Shiro1CryptFormat.java
@@ -18,11 +18,11 @@
  */
 package org.apache.shiro.crypto.hash.format;
 
-import org.apache.shiro.codec.Base64;
+import org.apache.shiro.lang.codec.Base64;
 import org.apache.shiro.crypto.hash.Hash;
 import org.apache.shiro.crypto.hash.SimpleHash;
-import org.apache.shiro.util.ByteSource;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.ByteSource;
+import org.apache.shiro.lang.util.StringUtils;
 
 /**
  * The {@code Shiro1CryptFormat} is a fully reversible
diff --git a/crypto/hash/src/test/groovy/org/apache/shiro/crypto/hash/DefaultHashServiceTest.groovy b/crypto/hash/src/test/groovy/org/apache/shiro/crypto/hash/DefaultHashServiceTest.groovy
index fe59ac0..d021be2 100644
--- a/crypto/hash/src/test/groovy/org/apache/shiro/crypto/hash/DefaultHashServiceTest.groovy
+++ b/crypto/hash/src/test/groovy/org/apache/shiro/crypto/hash/DefaultHashServiceTest.groovy
@@ -20,7 +20,7 @@ package org.apache.shiro.crypto.hash
 
 import org.apache.shiro.crypto.RandomNumberGenerator
 import org.apache.shiro.crypto.SecureRandomNumberGenerator
-import org.apache.shiro.util.ByteSource
+import org.apache.shiro.lang.util.ByteSource
 import org.junit.Test
 
 import static org.easymock.EasyMock.*
diff --git a/crypto/hash/src/test/groovy/org/apache/shiro/crypto/hash/HashRequestBuilderTest.groovy b/crypto/hash/src/test/groovy/org/apache/shiro/crypto/hash/HashRequestBuilderTest.groovy
index a60eaeb..527098c 100644
--- a/crypto/hash/src/test/groovy/org/apache/shiro/crypto/hash/HashRequestBuilderTest.groovy
+++ b/crypto/hash/src/test/groovy/org/apache/shiro/crypto/hash/HashRequestBuilderTest.groovy
@@ -19,7 +19,7 @@
 package org.apache.shiro.crypto.hash
 
 import org.apache.shiro.crypto.SecureRandomNumberGenerator
-import org.apache.shiro.util.ByteSource
+import org.apache.shiro.lang.util.ByteSource
 import org.junit.Test
 
 import static org.junit.Assert.*
diff --git a/event/pom.xml b/event/pom.xml
index 19e8912..a105866 100644
--- a/event/pom.xml
+++ b/event/pom.xml
@@ -42,7 +42,7 @@
                         <Bundle-SymbolicName>org.apache.shiro.event</Bundle-SymbolicName>
                         <Export-Package>org.apache.shiro.event*;version=${project.version}</Export-Package>
                         <Import-Package>
-                            org.apache.shiro*;version="${shiro.osgi.importRange}",
+                            org.apache.shiro.lang*;version="${shiro.osgi.importRange}",
                             *
                         </Import-Package>
                     </instructions>
diff --git a/event/src/main/java/org/apache/shiro/event/support/AnnotationEventListenerResolver.java b/event/src/main/java/org/apache/shiro/event/support/AnnotationEventListenerResolver.java
index a9a94ce..9a4fe1d 100644
--- a/event/src/main/java/org/apache/shiro/event/support/AnnotationEventListenerResolver.java
+++ b/event/src/main/java/org/apache/shiro/event/support/AnnotationEventListenerResolver.java
@@ -19,7 +19,7 @@
 package org.apache.shiro.event.support;
 
 import org.apache.shiro.event.Subscribe;
-import org.apache.shiro.util.ClassUtils;
+import org.apache.shiro.lang.util.ClassUtils;
 
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Method;
diff --git a/integration-tests/guice3/src/main/java/org/apache/shiro/samples/guice/SampleShiroServletModule.java b/integration-tests/guice3/src/main/java/org/apache/shiro/samples/guice/SampleShiroServletModule.java
index 8b23855..9e6af33 100644
--- a/integration-tests/guice3/src/main/java/org/apache/shiro/samples/guice/SampleShiroServletModule.java
+++ b/integration-tests/guice3/src/main/java/org/apache/shiro/samples/guice/SampleShiroServletModule.java
@@ -21,7 +21,7 @@ package org.apache.shiro.samples.guice;
 import com.google.inject.Provides;
 import com.google.inject.binder.AnnotatedBindingBuilder;
 import com.google.inject.name.Names;
-import org.apache.shiro.codec.Base64;
+import org.apache.shiro.lang.codec.Base64;
 import org.apache.shiro.config.ConfigurationException;
 import org.apache.shiro.config.Ini;
 import org.apache.shiro.guice.web.ShiroWebModule;
diff --git a/integration-tests/guice4/src/main/java/org/apache/shiro/samples/guice/SampleShiroServletModule.java b/integration-tests/guice4/src/main/java/org/apache/shiro/samples/guice/SampleShiroServletModule.java
index ca6c2a3..312a593 100644
--- a/integration-tests/guice4/src/main/java/org/apache/shiro/samples/guice/SampleShiroServletModule.java
+++ b/integration-tests/guice4/src/main/java/org/apache/shiro/samples/guice/SampleShiroServletModule.java
@@ -21,7 +21,7 @@ package org.apache.shiro.samples.guice;
 import com.google.inject.Provides;
 import com.google.inject.binder.AnnotatedBindingBuilder;
 import com.google.inject.name.Names;
-import org.apache.shiro.codec.Base64;
+import org.apache.shiro.lang.codec.Base64;
 import org.apache.shiro.config.ConfigurationException;
 import org.apache.shiro.config.Ini;
 import org.apache.shiro.guice.web.ShiroWebModule;
diff --git a/integration-tests/support/src/main/java/org/apache/shiro/testing/web/AbstractContainerIT.java b/integration-tests/support/src/main/java/org/apache/shiro/testing/web/AbstractContainerIT.java
index 5d3fcc0..9c08423 100644
--- a/integration-tests/support/src/main/java/org/apache/shiro/testing/web/AbstractContainerIT.java
+++ b/integration-tests/support/src/main/java/org/apache/shiro/testing/web/AbstractContainerIT.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.testing.web;
 
-import org.apache.shiro.codec.Base64;
+import org.apache.shiro.lang.codec.Base64;
 
 import com.gargoylesoftware.htmlunit.WebClient;
 import com.github.mjeanroy.junit.servers.jetty.EmbeddedJetty;
diff --git a/lang/pom.xml b/lang/pom.xml
index 275a7d2..434c68e 100644
--- a/lang/pom.xml
+++ b/lang/pom.xml
@@ -62,10 +62,9 @@
                 <configuration>
                     <instructions>
                         <Bundle-SymbolicName>org.apache.shiro.lang</Bundle-SymbolicName>
-                        <Export-Package>org.apache.shiro.*;version=${project.version}</Export-Package>
+                        <Export-Package>org.apache.shiro.lang.*;version=${project.version}</Export-Package>
                         <!-- javax.servlet.jsp* marked as optional per SHIRO-390: -->
                         <Import-Package>
-                            org.apache.shiro*;version="${shiro.osgi.importRange}",
                             javax.servlet.jsp*;resolution:=optional,
                             *
                         </Import-Package>
diff --git a/lang/src/main/java/org/apache/shiro/ShiroException.java b/lang/src/main/java/org/apache/shiro/lang/ShiroException.java
similarity index 98%
rename from lang/src/main/java/org/apache/shiro/ShiroException.java
rename to lang/src/main/java/org/apache/shiro/lang/ShiroException.java
index 22339cb..085e08e 100644
--- a/lang/src/main/java/org/apache/shiro/ShiroException.java
+++ b/lang/src/main/java/org/apache/shiro/lang/ShiroException.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro;
+package org.apache.shiro.lang;
 
 /**
  * Root exception for all Shiro runtime exceptions.  This class is used as the root instead
diff --git a/lang/src/main/java/org/apache/shiro/codec/Base64.java b/lang/src/main/java/org/apache/shiro/lang/codec/Base64.java
similarity index 99%
rename from lang/src/main/java/org/apache/shiro/codec/Base64.java
rename to lang/src/main/java/org/apache/shiro/lang/codec/Base64.java
index b277b13..7738259 100644
--- a/lang/src/main/java/org/apache/shiro/codec/Base64.java
+++ b/lang/src/main/java/org/apache/shiro/lang/codec/Base64.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.codec;
+package org.apache.shiro.lang.codec;
 
 /**
  * Provides <a href="http://en.wikipedia.org/wiki/Base64">Base 64</a> encoding and decoding as defined by
diff --git a/lang/src/main/java/org/apache/shiro/codec/CodecException.java b/lang/src/main/java/org/apache/shiro/lang/codec/CodecException.java
similarity index 95%
rename from lang/src/main/java/org/apache/shiro/codec/CodecException.java
rename to lang/src/main/java/org/apache/shiro/lang/codec/CodecException.java
index 97a8a17..e5c4596 100644
--- a/lang/src/main/java/org/apache/shiro/codec/CodecException.java
+++ b/lang/src/main/java/org/apache/shiro/lang/codec/CodecException.java
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.codec;
+package org.apache.shiro.lang.codec;
 
-import org.apache.shiro.ShiroException;
+import org.apache.shiro.lang.ShiroException;
 
 /**
  * Root exception related to issues during encoding or decoding.
diff --git a/lang/src/main/java/org/apache/shiro/codec/CodecSupport.java b/lang/src/main/java/org/apache/shiro/lang/codec/CodecSupport.java
similarity index 99%
rename from lang/src/main/java/org/apache/shiro/codec/CodecSupport.java
rename to lang/src/main/java/org/apache/shiro/lang/codec/CodecSupport.java
index b41d55b..e503f7e 100644
--- a/lang/src/main/java/org/apache/shiro/codec/CodecSupport.java
+++ b/lang/src/main/java/org/apache/shiro/lang/codec/CodecSupport.java
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.codec;
+package org.apache.shiro.lang.codec;
 
-import org.apache.shiro.util.ByteSource;
+import org.apache.shiro.lang.util.ByteSource;
 
 import java.io.*;
 
diff --git a/lang/src/main/java/org/apache/shiro/codec/H64.java b/lang/src/main/java/org/apache/shiro/lang/codec/H64.java
similarity index 99%
rename from lang/src/main/java/org/apache/shiro/codec/H64.java
rename to lang/src/main/java/org/apache/shiro/lang/codec/H64.java
index 8c674c2..fd30aa1 100644
--- a/lang/src/main/java/org/apache/shiro/codec/H64.java
+++ b/lang/src/main/java/org/apache/shiro/lang/codec/H64.java
@@ -27,7 +27,7 @@
  * this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
  * ----------------------------------------------------------------------------
  */
-package org.apache.shiro.codec;
+package org.apache.shiro.lang.codec;
 
 import java.io.IOException;
 
diff --git a/lang/src/main/java/org/apache/shiro/codec/Hex.java b/lang/src/main/java/org/apache/shiro/lang/codec/Hex.java
similarity index 99%
rename from lang/src/main/java/org/apache/shiro/codec/Hex.java
rename to lang/src/main/java/org/apache/shiro/lang/codec/Hex.java
index 79e72ac..00e4e0a 100644
--- a/lang/src/main/java/org/apache/shiro/codec/Hex.java
+++ b/lang/src/main/java/org/apache/shiro/lang/codec/Hex.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.codec;
+package org.apache.shiro.lang.codec;
 
 /**
  * <a href="http://en.wikipedia.org/wiki/Hexadecimal">Hexadecimal</a> encoder and decoder.
diff --git a/lang/src/main/java/org/apache/shiro/codec/package-info.java b/lang/src/main/java/org/apache/shiro/lang/codec/package-info.java
similarity index 96%
rename from lang/src/main/java/org/apache/shiro/codec/package-info.java
rename to lang/src/main/java/org/apache/shiro/lang/codec/package-info.java
index 408dd51..13b2d2f 100644
--- a/lang/src/main/java/org/apache/shiro/codec/package-info.java
+++ b/lang/src/main/java/org/apache/shiro/lang/codec/package-info.java
@@ -20,4 +20,4 @@
  * Components for encoding and decoding of data across multiple formats, especially useful in Shiro's
  * cryptography and web functionality.
  */
-package org.apache.shiro.codec;
+package org.apache.shiro.lang.codec;
diff --git a/lang/src/main/java/org/apache/shiro/io/ClassResolvingObjectInputStream.java b/lang/src/main/java/org/apache/shiro/lang/io/ClassResolvingObjectInputStream.java
similarity index 94%
rename from lang/src/main/java/org/apache/shiro/io/ClassResolvingObjectInputStream.java
rename to lang/src/main/java/org/apache/shiro/lang/io/ClassResolvingObjectInputStream.java
index 1804b22..9125e41 100644
--- a/lang/src/main/java/org/apache/shiro/io/ClassResolvingObjectInputStream.java
+++ b/lang/src/main/java/org/apache/shiro/lang/io/ClassResolvingObjectInputStream.java
@@ -16,10 +16,10 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.io;
+package org.apache.shiro.lang.io;
 
-import org.apache.shiro.util.ClassUtils;
-import org.apache.shiro.util.UnknownClassException;
+import org.apache.shiro.lang.util.ClassUtils;
+import org.apache.shiro.lang.util.UnknownClassException;
 
 import java.io.IOException;
 import java.io.InputStream;
diff --git a/lang/src/main/java/org/apache/shiro/io/DefaultSerializer.java b/lang/src/main/java/org/apache/shiro/lang/io/DefaultSerializer.java
similarity index 99%
rename from lang/src/main/java/org/apache/shiro/io/DefaultSerializer.java
rename to lang/src/main/java/org/apache/shiro/lang/io/DefaultSerializer.java
index 433a825..03d06c6 100644
--- a/lang/src/main/java/org/apache/shiro/io/DefaultSerializer.java
+++ b/lang/src/main/java/org/apache/shiro/lang/io/DefaultSerializer.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.io;
+package org.apache.shiro.lang.io;
 
 import java.io.*;
 
diff --git a/lang/src/main/java/org/apache/shiro/io/ResourceUtils.java b/lang/src/main/java/org/apache/shiro/lang/io/ResourceUtils.java
similarity index 98%
rename from lang/src/main/java/org/apache/shiro/io/ResourceUtils.java
rename to lang/src/main/java/org/apache/shiro/lang/io/ResourceUtils.java
index 703689d..174f489 100644
--- a/lang/src/main/java/org/apache/shiro/io/ResourceUtils.java
+++ b/lang/src/main/java/org/apache/shiro/lang/io/ResourceUtils.java
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.io;
+package org.apache.shiro.lang.io;
 
-import org.apache.shiro.util.ClassUtils;
+import org.apache.shiro.lang.util.ClassUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/lang/src/main/java/org/apache/shiro/io/SerializationException.java b/lang/src/main/java/org/apache/shiro/lang/io/SerializationException.java
similarity index 95%
rename from lang/src/main/java/org/apache/shiro/io/SerializationException.java
rename to lang/src/main/java/org/apache/shiro/lang/io/SerializationException.java
index 8f90ba0..a10a254 100644
--- a/lang/src/main/java/org/apache/shiro/io/SerializationException.java
+++ b/lang/src/main/java/org/apache/shiro/lang/io/SerializationException.java
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.io;
+package org.apache.shiro.lang.io;
 
-import org.apache.shiro.ShiroException;
+import org.apache.shiro.lang.ShiroException;
 
 
 /**
diff --git a/lang/src/main/java/org/apache/shiro/io/Serializer.java b/lang/src/main/java/org/apache/shiro/lang/io/Serializer.java
similarity index 93%
rename from lang/src/main/java/org/apache/shiro/io/Serializer.java
rename to lang/src/main/java/org/apache/shiro/lang/io/Serializer.java
index daead98..6e23ef9 100644
--- a/lang/src/main/java/org/apache/shiro/io/Serializer.java
+++ b/lang/src/main/java/org/apache/shiro/lang/io/Serializer.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.io;
+package org.apache.shiro.lang.io;
 
 /**
  * A <code>Serializer</code> converts objects to raw binary data and vice versa, enabling persistent storage
@@ -24,7 +24,7 @@ package org.apache.shiro.io;
  * <p/>
  * A <code>Serializer</code> should only do conversion, never change the data, such as encoding/decoding or
  * encryption.  These orthogonal concerns are handled elsewhere by Shiro, for example, via
- * {@link org.apache.shiro.codec.CodecSupport CodecSupport} and {@link org.apache.shiro.crypto.CipherService CipherService}s.
+ * {@link org.apache.shiro.lang.codec.CodecSupport CodecSupport} and {@link org.apache.shiro.crypto.CipherService CipherService}s.
  *
  * @param <T> The type of the object being serialized and deserialized.
  * @since 0.9
diff --git a/lang/src/main/java/org/apache/shiro/io/XmlSerializer.java b/lang/src/main/java/org/apache/shiro/lang/io/XmlSerializer.java
similarity index 98%
rename from lang/src/main/java/org/apache/shiro/io/XmlSerializer.java
rename to lang/src/main/java/org/apache/shiro/lang/io/XmlSerializer.java
index 583a8ce..8e31716 100644
--- a/lang/src/main/java/org/apache/shiro/io/XmlSerializer.java
+++ b/lang/src/main/java/org/apache/shiro/lang/io/XmlSerializer.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.io;
+package org.apache.shiro.lang.io;
 
 import java.beans.XMLDecoder;
 import java.beans.XMLEncoder;
diff --git a/lang/src/main/java/org/apache/shiro/io/package-info.java b/lang/src/main/java/org/apache/shiro/lang/io/package-info.java
similarity index 96%
rename from lang/src/main/java/org/apache/shiro/io/package-info.java
rename to lang/src/main/java/org/apache/shiro/lang/io/package-info.java
index 043c3b1..ce9cc35 100644
--- a/lang/src/main/java/org/apache/shiro/io/package-info.java
+++ b/lang/src/main/java/org/apache/shiro/lang/io/package-info.java
@@ -19,4 +19,4 @@
 /**
  * Support for reading and writing (input/output) raw data from multiple resource locations.
  */
-package org.apache.shiro.io;
+package org.apache.shiro.lang.io;
diff --git a/lang/src/main/java/org/apache/shiro/util/Assert.java b/lang/src/main/java/org/apache/shiro/lang/util/Assert.java
similarity index 99%
rename from lang/src/main/java/org/apache/shiro/util/Assert.java
rename to lang/src/main/java/org/apache/shiro/lang/util/Assert.java
index 689f720..a1486bf 100644
--- a/lang/src/main/java/org/apache/shiro/util/Assert.java
+++ b/lang/src/main/java/org/apache/shiro/lang/util/Assert.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.util;
+package org.apache.shiro.lang.util;
 
 import java.util.Collection;
 import java.util.Map;
diff --git a/lang/src/main/java/org/apache/shiro/util/ByteSource.java b/lang/src/main/java/org/apache/shiro/lang/util/ByteSource.java
similarity index 99%
rename from lang/src/main/java/org/apache/shiro/util/ByteSource.java
rename to lang/src/main/java/org/apache/shiro/lang/util/ByteSource.java
index 85c1b35..f9a1331 100644
--- a/lang/src/main/java/org/apache/shiro/util/ByteSource.java
+++ b/lang/src/main/java/org/apache/shiro/lang/util/ByteSource.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.util;
+package org.apache.shiro.lang.util;
 
 import java.io.File;
 import java.io.InputStream;
diff --git a/lang/src/main/java/org/apache/shiro/util/ClassUtils.java b/lang/src/main/java/org/apache/shiro/lang/util/ClassUtils.java
similarity index 99%
rename from lang/src/main/java/org/apache/shiro/util/ClassUtils.java
rename to lang/src/main/java/org/apache/shiro/lang/util/ClassUtils.java
index aa7334b..ac885a1 100644
--- a/lang/src/main/java/org/apache/shiro/util/ClassUtils.java
+++ b/lang/src/main/java/org/apache/shiro/lang/util/ClassUtils.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.util;
+package org.apache.shiro.lang.util;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
diff --git a/lang/src/main/java/org/apache/shiro/util/Destroyable.java b/lang/src/main/java/org/apache/shiro/lang/util/Destroyable.java
similarity index 97%
rename from lang/src/main/java/org/apache/shiro/util/Destroyable.java
rename to lang/src/main/java/org/apache/shiro/lang/util/Destroyable.java
index 584cf97..e9a40a8 100644
--- a/lang/src/main/java/org/apache/shiro/util/Destroyable.java
+++ b/lang/src/main/java/org/apache/shiro/lang/util/Destroyable.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.util;
+package org.apache.shiro.lang.util;
 
 /**
  * Shiro container-agnostic interface that indicates that this object requires a callback during destruction.
diff --git a/lang/src/main/java/org/apache/shiro/util/Factory.java b/lang/src/main/java/org/apache/shiro/lang/util/Factory.java
similarity index 97%
rename from lang/src/main/java/org/apache/shiro/util/Factory.java
rename to lang/src/main/java/org/apache/shiro/lang/util/Factory.java
index 908d31a..6ad9727 100644
--- a/lang/src/main/java/org/apache/shiro/util/Factory.java
+++ b/lang/src/main/java/org/apache/shiro/lang/util/Factory.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.util;
+package org.apache.shiro.lang.util;
 
 /**
  * Generics-aware interface supporting the
diff --git a/lang/src/main/java/org/apache/shiro/util/Initializable.java b/lang/src/main/java/org/apache/shiro/lang/util/Initializable.java
similarity index 90%
rename from lang/src/main/java/org/apache/shiro/util/Initializable.java
rename to lang/src/main/java/org/apache/shiro/lang/util/Initializable.java
index 167f444..37add6f 100644
--- a/lang/src/main/java/org/apache/shiro/util/Initializable.java
+++ b/lang/src/main/java/org/apache/shiro/lang/util/Initializable.java
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.util;
+package org.apache.shiro.lang.util;
 
-import org.apache.shiro.ShiroException;
+import org.apache.shiro.lang.ShiroException;
 
 /**
  * Shiro container-agnostic interface that indicates that this object requires initialization.
@@ -30,7 +30,7 @@ public interface Initializable {
     /**
      * Initializes this object.
      *
-     * @throws org.apache.shiro.ShiroException
+     * @throws ShiroException
      *          if an exception occurs during initialization.
      */
     void init() throws ShiroException;
diff --git a/lang/src/main/java/org/apache/shiro/util/InstantiationException.java b/lang/src/main/java/org/apache/shiro/lang/util/InstantiationException.java
similarity index 95%
rename from lang/src/main/java/org/apache/shiro/util/InstantiationException.java
rename to lang/src/main/java/org/apache/shiro/lang/util/InstantiationException.java
index b042ef0..b46511e 100644
--- a/lang/src/main/java/org/apache/shiro/util/InstantiationException.java
+++ b/lang/src/main/java/org/apache/shiro/lang/util/InstantiationException.java
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.util;
+package org.apache.shiro.lang.util;
 
-import org.apache.shiro.ShiroException;
+import org.apache.shiro.lang.ShiroException;
 
 /**
  * Runtime exception thrown by the framework when unable to instantiate a Class via reflection.
diff --git a/lang/src/main/java/org/apache/shiro/util/LifecycleUtils.java b/lang/src/main/java/org/apache/shiro/lang/util/LifecycleUtils.java
similarity index 90%
rename from lang/src/main/java/org/apache/shiro/util/LifecycleUtils.java
rename to lang/src/main/java/org/apache/shiro/lang/util/LifecycleUtils.java
index e525f0f..9d78646 100644
--- a/lang/src/main/java/org/apache/shiro/util/LifecycleUtils.java
+++ b/lang/src/main/java/org/apache/shiro/lang/util/LifecycleUtils.java
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.util;
+package org.apache.shiro.lang.util;
 
-import org.apache.shiro.ShiroException;
+import org.apache.shiro.lang.ShiroException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -26,8 +26,8 @@ import java.util.Collection;
 
 
 /**
- * Utility class to help call {@link org.apache.shiro.util.Initializable#init() Initializable.init()} and
- * {@link org.apache.shiro.util.Destroyable#destroy() Destroyable.destroy()} methods cleanly on any object.
+ * Utility class to help call {@link org.apache.shiro.lang.util.Initializable#init() Initializable.init()} and
+ * {@link org.apache.shiro.lang.util.Destroyable#destroy() Destroyable.destroy()} methods cleanly on any object.
  *
  * @since 0.2
  */
diff --git a/lang/src/main/java/org/apache/shiro/util/Nameable.java b/lang/src/main/java/org/apache/shiro/lang/util/Nameable.java
similarity index 97%
rename from lang/src/main/java/org/apache/shiro/util/Nameable.java
rename to lang/src/main/java/org/apache/shiro/lang/util/Nameable.java
index 17bdc45..b645b4a 100644
--- a/lang/src/main/java/org/apache/shiro/util/Nameable.java
+++ b/lang/src/main/java/org/apache/shiro/lang/util/Nameable.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.util;
+package org.apache.shiro.lang.util;
 
 
 /**
diff --git a/lang/src/main/java/org/apache/shiro/util/SimpleByteSource.java b/lang/src/main/java/org/apache/shiro/lang/util/SimpleByteSource.java
similarity index 97%
rename from lang/src/main/java/org/apache/shiro/util/SimpleByteSource.java
rename to lang/src/main/java/org/apache/shiro/lang/util/SimpleByteSource.java
index ce27f0f..18594f6 100644
--- a/lang/src/main/java/org/apache/shiro/util/SimpleByteSource.java
+++ b/lang/src/main/java/org/apache/shiro/lang/util/SimpleByteSource.java
@@ -16,11 +16,11 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.util;
+package org.apache.shiro.lang.util;
 
-import org.apache.shiro.codec.Base64;
-import org.apache.shiro.codec.CodecSupport;
-import org.apache.shiro.codec.Hex;
+import org.apache.shiro.lang.codec.Base64;
+import org.apache.shiro.lang.codec.CodecSupport;
+import org.apache.shiro.lang.codec.Hex;
 
 import java.io.File;
 import java.io.InputStream;
diff --git a/lang/src/main/java/org/apache/shiro/util/SoftHashMap.java b/lang/src/main/java/org/apache/shiro/lang/util/SoftHashMap.java
similarity index 99%
rename from lang/src/main/java/org/apache/shiro/util/SoftHashMap.java
rename to lang/src/main/java/org/apache/shiro/lang/util/SoftHashMap.java
index 233883c..ffd3bd4 100644
--- a/lang/src/main/java/org/apache/shiro/util/SoftHashMap.java
+++ b/lang/src/main/java/org/apache/shiro/lang/util/SoftHashMap.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.util;
+package org.apache.shiro.lang.util;
 
 import java.lang.ref.ReferenceQueue;
 import java.lang.ref.SoftReference;
diff --git a/lang/src/main/java/org/apache/shiro/util/StringUtils.java b/lang/src/main/java/org/apache/shiro/lang/util/StringUtils.java
similarity index 99%
rename from lang/src/main/java/org/apache/shiro/util/StringUtils.java
rename to lang/src/main/java/org/apache/shiro/lang/util/StringUtils.java
index 70ee06d..4ae65c9 100644
--- a/lang/src/main/java/org/apache/shiro/util/StringUtils.java
+++ b/lang/src/main/java/org/apache/shiro/lang/util/StringUtils.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.util;
+package org.apache.shiro.lang.util;
 
 import java.text.ParseException;
 import java.util.*;
diff --git a/lang/src/main/java/org/apache/shiro/util/UnknownClassException.java b/lang/src/main/java/org/apache/shiro/lang/util/UnknownClassException.java
similarity index 95%
rename from lang/src/main/java/org/apache/shiro/util/UnknownClassException.java
rename to lang/src/main/java/org/apache/shiro/lang/util/UnknownClassException.java
index b5d96cd..b7891e1 100644
--- a/lang/src/main/java/org/apache/shiro/util/UnknownClassException.java
+++ b/lang/src/main/java/org/apache/shiro/lang/util/UnknownClassException.java
@@ -16,9 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.shiro.util;
+package org.apache.shiro.lang.util;
 
-import org.apache.shiro.ShiroException;
+import org.apache.shiro.lang.ShiroException;
 
 
 /**
diff --git a/pom.xml b/pom.xml
index 39b301a..db123fc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,7 +72,7 @@
         <jacoco.skip>true</jacoco.skip>
 
         <!-- non-dependency-based properties: -->
-        <shiro.osgi.importRange>[1.2, 2)</shiro.osgi.importRange>
+        <shiro.osgi.importRange>[2, 3)</shiro.osgi.importRange>
 
         <!-- Compile 3rd party dependencies: -->
         <!-- Don't change this version without also changing the shiro-aspect and shiro-features
@@ -81,9 +81,11 @@
         <commons.beanutils.version>1.9.4</commons.beanutils.version>
         <commons.cli.version>1.4</commons.cli.version>
         <commons.codec.version>1.14</commons.codec.version>
+        <commons.collection.version>3.2.2</commons.collection.version>
         <commons.configuration2.version>2.7</commons.configuration2.version>
         <commons.lang3.version>3.9</commons.lang3.version>
         <commons.logging.version>1.2</commons.logging.version>
+        <commons.text.version>1.8</commons.text.version>
         <!-- Don't change this version without also changing the shiro-ehcache and shiro-features
              modules' OSGi metadata: -->
         <ehcache.version>2.6.11</ehcache.version>
diff --git a/samples/aspectj/src/test/java/org/apache/shiro/samples/aspectj/bank/SecureBankServiceTest.java b/samples/aspectj/src/test/java/org/apache/shiro/samples/aspectj/bank/SecureBankServiceTest.java
index 266c6cd..9b35bbb 100644
--- a/samples/aspectj/src/test/java/org/apache/shiro/samples/aspectj/bank/SecureBankServiceTest.java
+++ b/samples/aspectj/src/test/java/org/apache/shiro/samples/aspectj/bank/SecureBankServiceTest.java
@@ -21,10 +21,10 @@ package org.apache.shiro.samples.aspectj.bank;
 import org.apache.shiro.SecurityUtils;
 import org.apache.shiro.authc.UsernamePasswordToken;
 import org.apache.shiro.authz.UnauthorizedException;
-import org.apache.shiro.config.IniSecurityManagerFactory;
+import org.apache.shiro.ini.IniSecurityManagerFactory;
 import org.apache.shiro.mgt.SecurityManager;
 import org.apache.shiro.subject.Subject;
-import org.apache.shiro.util.Factory;
+import org.apache.shiro.lang.util.Factory;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Assert;
diff --git a/samples/guice/src/main/java/org/apache/shiro/samples/guice/SampleShiroNativeSessionsServletModule.java b/samples/guice/src/main/java/org/apache/shiro/samples/guice/SampleShiroNativeSessionsServletModule.java
index 0926496..271982d 100644
--- a/samples/guice/src/main/java/org/apache/shiro/samples/guice/SampleShiroNativeSessionsServletModule.java
+++ b/samples/guice/src/main/java/org/apache/shiro/samples/guice/SampleShiroNativeSessionsServletModule.java
@@ -21,7 +21,7 @@ package org.apache.shiro.samples.guice;
 import com.google.inject.Provides;
 import com.google.inject.binder.AnnotatedBindingBuilder;
 import com.google.inject.name.Names;
-import org.apache.shiro.codec.Base64;
+import org.apache.shiro.lang.codec.Base64;
 import org.apache.shiro.config.ConfigurationException;
 import org.apache.shiro.config.Ini;
 import org.apache.shiro.guice.web.ShiroWebModule;
diff --git a/samples/guice/src/main/java/org/apache/shiro/samples/guice/SampleShiroServletModule.java b/samples/guice/src/main/java/org/apache/shiro/samples/guice/SampleShiroServletModule.java
index 945ae70..312a593 100644
--- a/samples/guice/src/main/java/org/apache/shiro/samples/guice/SampleShiroServletModule.java
+++ b/samples/guice/src/main/java/org/apache/shiro/samples/guice/SampleShiroServletModule.java
@@ -21,7 +21,7 @@ package org.apache.shiro.samples.guice;
 import com.google.inject.Provides;
 import com.google.inject.binder.AnnotatedBindingBuilder;
 import com.google.inject.name.Names;
-import org.apache.shiro.codec.Base64;
+import org.apache.shiro.lang.codec.Base64;
 import org.apache.shiro.config.ConfigurationException;
 import org.apache.shiro.config.Ini;
 import org.apache.shiro.guice.web.ShiroWebModule;
@@ -31,7 +31,6 @@ import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
 import org.apache.shiro.web.mgt.WebSecurityManager;
 
 import javax.inject.Singleton;
-import javax.servlet.Filter;
 import javax.servlet.ServletContext;
 import java.net.MalformedURLException;
 import java.net.URL;
diff --git a/samples/quickstart/src/main/java/Quickstart.java b/samples/quickstart/src/main/java/Quickstart.java
index 463342b..fbba9d2 100644
--- a/samples/quickstart/src/main/java/Quickstart.java
+++ b/samples/quickstart/src/main/java/Quickstart.java
@@ -19,11 +19,11 @@
 
 import org.apache.shiro.SecurityUtils;
 import org.apache.shiro.authc.*;
-import org.apache.shiro.config.IniSecurityManagerFactory;
+import org.apache.shiro.ini.IniSecurityManagerFactory;
 import org.apache.shiro.mgt.SecurityManager;
 import org.apache.shiro.session.Session;
 import org.apache.shiro.subject.Subject;
-import org.apache.shiro.util.Factory;
+import org.apache.shiro.lang.util.Factory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/samples/servlet-plugin/src/main/webapp/WEB-INF/shiro.ini b/samples/servlet-plugin/src/main/webapp/WEB-INF/shiro.ini
index 083172a..759427c 100644
--- a/samples/servlet-plugin/src/main/webapp/WEB-INF/shiro.ini
+++ b/samples/servlet-plugin/src/main/webapp/WEB-INF/shiro.ini
@@ -21,7 +21,7 @@
 # http://shiro.apache.org/web.html for more.
 
 [main]
-listener = org.apache.shiro.config.event.LoggingBeanEventListener
+listener = org.apache.shiro.config.ogdl.event.LoggingBeanEventListener
 
 shiro.loginUrl = /login.jsp
 sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager
diff --git a/samples/spring-boot/src/main/java/org/apache/shiro/samples/QuickStart.java b/samples/spring-boot/src/main/java/org/apache/shiro/samples/QuickStart.java
index bf6eef8..8751f10 100644
--- a/samples/spring-boot/src/main/java/org/apache/shiro/samples/QuickStart.java
+++ b/samples/spring-boot/src/main/java/org/apache/shiro/samples/QuickStart.java
@@ -23,7 +23,7 @@ import org.apache.shiro.authc.UsernamePasswordToken;
 import org.apache.shiro.authz.AuthorizationException;
 import org.apache.shiro.mgt.SecurityManager;
 import org.apache.shiro.subject.Subject;
-import org.apache.shiro.util.Assert;
+import org.apache.shiro.lang.util.Assert;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
diff --git a/samples/spring-hibernate/src/main/java/org/apache/shiro/samples/sprhib/web/EditUserValidator.java b/samples/spring-hibernate/src/main/java/org/apache/shiro/samples/sprhib/web/EditUserValidator.java
index 09d4583..b630ca0 100644
--- a/samples/spring-hibernate/src/main/java/org/apache/shiro/samples/sprhib/web/EditUserValidator.java
+++ b/samples/spring-hibernate/src/main/java/org/apache/shiro/samples/sprhib/web/EditUserValidator.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.samples.sprhib.web;
 
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 import org.springframework.validation.Errors;
 import org.springframework.validation.ValidationUtils;
 import org.springframework.validation.Validator;
diff --git a/samples/spring-hibernate/src/main/java/org/apache/shiro/samples/sprhib/web/SignupValidator.java b/samples/spring-hibernate/src/main/java/org/apache/shiro/samples/sprhib/web/SignupValidator.java
index 26859ff..ebbaec9 100644
--- a/samples/spring-hibernate/src/main/java/org/apache/shiro/samples/sprhib/web/SignupValidator.java
+++ b/samples/spring-hibernate/src/main/java/org/apache/shiro/samples/sprhib/web/SignupValidator.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.samples.sprhib.web;
 
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 import org.springframework.validation.Errors;
 import org.springframework.validation.ValidationUtils;
 import org.springframework.validation.Validator;
diff --git a/samples/spring-mvc/src/main/java/org/apache/shiro/samples/spring/realm/SaltAwareJdbcRealm.java b/samples/spring-mvc/src/main/java/org/apache/shiro/samples/spring/realm/SaltAwareJdbcRealm.java
index 56448d0..7954a2c 100644
--- a/samples/spring-mvc/src/main/java/org/apache/shiro/samples/spring/realm/SaltAwareJdbcRealm.java
+++ b/samples/spring-mvc/src/main/java/org/apache/shiro/samples/spring/realm/SaltAwareJdbcRealm.java
@@ -20,7 +20,7 @@ package org.apache.shiro.samples.spring.realm;
 
 import org.apache.shiro.authc.*;
 import org.apache.shiro.realm.jdbc.JdbcRealm;
-import org.apache.shiro.util.ByteSource;
+import org.apache.shiro.lang.util.ByteSource;
 import org.apache.shiro.util.JdbcUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
diff --git a/samples/spring/src/main/java/org/apache/shiro/samples/spring/QuickStart.java b/samples/spring/src/main/java/org/apache/shiro/samples/spring/QuickStart.java
index cb00d5a..9c342cc 100644
--- a/samples/spring/src/main/java/org/apache/shiro/samples/spring/QuickStart.java
+++ b/samples/spring/src/main/java/org/apache/shiro/samples/spring/QuickStart.java
@@ -23,7 +23,7 @@ import org.apache.shiro.authc.UsernamePasswordToken;
 import org.apache.shiro.authz.AuthorizationException;
 import org.apache.shiro.mgt.SecurityManager;
 import org.apache.shiro.subject.Subject;
-import org.apache.shiro.util.Assert;
+import org.apache.shiro.lang.util.Assert;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
diff --git a/samples/web/src/main/webapp/WEB-INF/shiro.ini b/samples/web/src/main/webapp/WEB-INF/shiro.ini
index 1e3885a..d9832b9 100644
--- a/samples/web/src/main/webapp/WEB-INF/shiro.ini
+++ b/samples/web/src/main/webapp/WEB-INF/shiro.ini
@@ -21,7 +21,7 @@
 # http://shiro.apache.org/web.html for more.
 
 [main]
-listener = org.apache.shiro.config.event.LoggingBeanEventListener
+listener = org.apache.shiro.config.ogdl.event.LoggingBeanEventListener
 
 shiro.loginUrl = /login.jsp
 shiro.postOnlyLogout = true
diff --git a/support/aspectj/src/test/java/org/apache/shiro/aspectj/DummyServiceTest.java b/support/aspectj/src/test/java/org/apache/shiro/aspectj/DummyServiceTest.java
index 1585f38..f41e261 100644
--- a/support/aspectj/src/test/java/org/apache/shiro/aspectj/DummyServiceTest.java
+++ b/support/aspectj/src/test/java/org/apache/shiro/aspectj/DummyServiceTest.java
@@ -26,10 +26,10 @@ import org.apache.shiro.SecurityUtils;
 import org.apache.shiro.authc.UsernamePasswordToken;
 import org.apache.shiro.authz.UnauthenticatedException;
 import org.apache.shiro.authz.UnauthorizedException;
-import org.apache.shiro.config.IniSecurityManagerFactory;
+import org.apache.shiro.ini.IniSecurityManagerFactory;
 import org.apache.shiro.mgt.SecurityManager;
 import org.apache.shiro.subject.Subject;
-import org.apache.shiro.util.Factory;
+import org.apache.shiro.lang.util.Factory;
 import org.junit.*;
 
 /**
diff --git a/support/ehcache/pom.xml b/support/ehcache/pom.xml
index b56cce3..a1e06f3 100644
--- a/support/ehcache/pom.xml
+++ b/support/ehcache/pom.xml
@@ -66,7 +66,7 @@
                         <Bundle-SymbolicName>org.apache.shiro.ehcache</Bundle-SymbolicName>
                         <Export-Package>org.apache.shiro.cache.ehcache*;version=${project.version}</Export-Package>
                         <Import-Package>
-                            org.apache.shiro*;version="${shiro.osgi.importRange}",
+                            org.apache.shiro.cache*;version="${shiro.osgi.importRange}",
                             net.sf.ehcache*;version="[2.5, 3)",
                             *
                         </Import-Package>
diff --git a/support/ehcache/src/main/java/org/apache/shiro/cache/ehcache/EhCacheManager.java b/support/ehcache/src/main/java/org/apache/shiro/cache/ehcache/EhCacheManager.java
index 7a89e6e..0001819 100644
--- a/support/ehcache/src/main/java/org/apache/shiro/cache/ehcache/EhCacheManager.java
+++ b/support/ehcache/src/main/java/org/apache/shiro/cache/ehcache/EhCacheManager.java
@@ -21,9 +21,9 @@ package org.apache.shiro.cache.ehcache;
 import org.apache.shiro.cache.Cache;
 import org.apache.shiro.cache.CacheException;
 import org.apache.shiro.cache.CacheManager;
-import org.apache.shiro.io.ResourceUtils;
-import org.apache.shiro.util.Destroyable;
-import org.apache.shiro.util.Initializable;
+import org.apache.shiro.lang.io.ResourceUtils;
+import org.apache.shiro.lang.util.Destroyable;
+import org.apache.shiro.lang.util.Initializable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -96,7 +96,7 @@ public class EhCacheManager implements CacheManager, Initializable, Destroyable
     /**
      * Returns the resource location of the config file used to initialize a new
      * EhCache CacheManager instance.  The string can be any resource path supported by the
-     * {@link org.apache.shiro.io.ResourceUtils#getInputStreamForPath(String)} call.
+     * {@link org.apache.shiro.lang.io.ResourceUtils#getInputStreamForPath(String)} call.
      * <p/>
      * This property is ignored if the CacheManager instance is injected directly - that is, it is only used to
      * lazily create a CacheManager if one is not already provided.
@@ -111,7 +111,7 @@ public class EhCacheManager implements CacheManager, Initializable, Destroyable
     /**
      * Sets the resource location of the config file used to initialize the wrapped
      * EhCache CacheManager instance.  The string can be any resource path supported by the
-     * {@link org.apache.shiro.io.ResourceUtils#getInputStreamForPath(String)} call.
+     * {@link org.apache.shiro.lang.io.ResourceUtils#getInputStreamForPath(String)} call.
      * <p/>
      * This property is ignored if the CacheManager instance is injected directly - that is, it is only used to
      * lazily create a CacheManager if one is not already provided.
diff --git a/support/ehcache/src/test/java/org/apache/shiro/cache/ehcache/EhCacheManagerTest.java b/support/ehcache/src/test/java/org/apache/shiro/cache/ehcache/EhCacheManagerTest.java
index c06a7e4..965c262 100644
--- a/support/ehcache/src/test/java/org/apache/shiro/cache/ehcache/EhCacheManagerTest.java
+++ b/support/ehcache/src/test/java/org/apache/shiro/cache/ehcache/EhCacheManagerTest.java
@@ -19,7 +19,7 @@
 package org.apache.shiro.cache.ehcache;
 
 import org.apache.shiro.cache.Cache;
-import org.apache.shiro.util.LifecycleUtils;
+import org.apache.shiro.lang.util.LifecycleUtils;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
diff --git a/support/features/src/main/resources/features.xml b/support/features/src/main/resources/features.xml
index d51aaca..5c6e94d 100644
--- a/support/features/src/main/resources/features.xml
+++ b/support/features/src/main/resources/features.xml
@@ -22,6 +22,18 @@
     <!-- Shiro core features: -->
 
     <feature name="shiro-core" version="${project.version}">
+        <bundle dependency="true">mvn:commons-beanutils/commons-beanutils/${commons.beanutils.version}</bundle>
+        <bundle dependency="true">mvn:org.apache.commons/commons-configuration2/${commons.configuration2.version}</bundle>
+        <bundle dependency="true">mvn:commons-collections/commons-collections/${commons.collection.version}</bundle>
+        <bundle dependency="true">mvn:org.apache.commons/commons-text/${commons.text.version}</bundle>
+        <bundle>mvn:org.apache.shiro/shiro-lang/${project.version}</bundle>
+        <bundle>mvn:org.apache.shiro/shiro-cache/${project.version}</bundle>
+        <bundle>mvn:org.apache.shiro/shiro-config-ogdl/${project.version}</bundle>
+        <bundle>mvn:org.apache.shiro/shiro-crypto-core/${project.version}</bundle>
+        <bundle>mvn:org.apache.shiro/shiro-crypto-cipher/${project.version}</bundle>
+        <bundle>mvn:org.apache.shiro/shiro-crypto-hash/${project.version}</bundle>
+        <bundle>mvn:org.apache.shiro/shiro-config-core/${project.version}</bundle>
+        <bundle>mvn:org.apache.shiro/shiro-event/${project.version}</bundle>
         <bundle>mvn:org.apache.shiro/shiro-core/${project.version}</bundle>
     </feature>
 
@@ -36,13 +48,13 @@
 
     <feature name="shiro-aspectj" version="${project.version}">
         <feature version="${project.version}">shiro-core</feature>
-        <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aspectj/${aspectj.bundle.version}</bundle>
+        <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aspectj/${aspectj.bundle.version}</bundle>
         <bundle>mvn:org.apache.shiro/shiro-aspectj/${project.version}</bundle>
     </feature>
 
     <feature name="shiro-ehcache" version="${project.version}">
         <feature version="${project.version}">shiro-core</feature>
-        <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache/${ehcache.bundle.version}</bundle>
+        <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache/${ehcache.bundle.version}</bundle>
         <bundle>mvn:org.apache.shiro/shiro-ehcache/${project.version}</bundle>
     </feature>
 
@@ -68,10 +80,10 @@
 
     <feature name="shiro-quartz" version="${project.version}">
         <feature version="${project.version}">shiro-core</feature>
-        <bundle dependency='true'>mvn:commons-collections/commons-collections/${commons.collections.version}</bundle>
-        <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.c3p0/${c3p0-bundle-version}</bundle>
-        <bundle dependency='true'>mvn:com.zaxxer/HikariCP-java7/${hikaricp-version}</bundle>
-        <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.quartz/${quartz.bundle.version}</bundle>
+        <bundle dependency="true">mvn:commons-collections/commons-collections/${commons.collections.version}</bundle>
+        <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.c3p0/${c3p0-bundle-version}</bundle>
+        <bundle dependency="true">mvn:com.zaxxer/HikariCP-java7/${hikaricp-version}</bundle>
+        <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.quartz/${quartz.bundle.version}</bundle>
         <bundle>mvn:org.apache.shiro/shiro-quartz/${project.version}</bundle>
     </feature>
 
diff --git a/support/guice/src/main/java/org/apache/shiro/guice/DestroyableInjectionListener.java b/support/guice/src/main/java/org/apache/shiro/guice/DestroyableInjectionListener.java
index cd866b3..fedb4f7 100644
--- a/support/guice/src/main/java/org/apache/shiro/guice/DestroyableInjectionListener.java
+++ b/support/guice/src/main/java/org/apache/shiro/guice/DestroyableInjectionListener.java
@@ -22,10 +22,10 @@ import com.google.inject.TypeLiteral;
 import com.google.inject.matcher.Matcher;
 import com.google.inject.matcher.Matchers;
 import com.google.inject.spi.InjectionListener;
-import org.apache.shiro.util.Destroyable;
+import org.apache.shiro.lang.util.Destroyable;
 
 /**
- * Injection listener that assists with honoring the {@link org.apache.shiro.util.Destroyable} interface.
+ * Injection listener that assists with honoring the {@link org.apache.shiro.lang.util.Destroyable} interface.
  *
  * @param <I>
  */
diff --git a/support/guice/src/main/java/org/apache/shiro/guice/InitializableInjectionListener.java b/support/guice/src/main/java/org/apache/shiro/guice/InitializableInjectionListener.java
index 0afed34..f9d08d5 100644
--- a/support/guice/src/main/java/org/apache/shiro/guice/InitializableInjectionListener.java
+++ b/support/guice/src/main/java/org/apache/shiro/guice/InitializableInjectionListener.java
@@ -22,10 +22,10 @@ import com.google.inject.TypeLiteral;
 import com.google.inject.matcher.Matcher;
 import com.google.inject.matcher.Matchers;
 import com.google.inject.spi.InjectionListener;
-import org.apache.shiro.util.Initializable;
+import org.apache.shiro.lang.util.Initializable;
 
 /**
- * Injection listener that honors the {@link org.apache.shiro.util.Initializable} interface.
+ * Injection listener that honors the {@link org.apache.shiro.lang.util.Initializable} interface.
  *
  * @param <I>
  */
diff --git a/support/guice/src/main/java/org/apache/shiro/guice/LifecycleTypeListener.java b/support/guice/src/main/java/org/apache/shiro/guice/LifecycleTypeListener.java
index 62f04c9..e58e187 100644
--- a/support/guice/src/main/java/org/apache/shiro/guice/LifecycleTypeListener.java
+++ b/support/guice/src/main/java/org/apache/shiro/guice/LifecycleTypeListener.java
@@ -23,8 +23,8 @@ import com.google.inject.matcher.Matcher;
 import com.google.inject.spi.InjectionListener;
 import com.google.inject.spi.TypeEncounter;
 import com.google.inject.spi.TypeListener;
-import org.apache.shiro.util.Destroyable;
-import org.apache.shiro.util.Initializable;
+import org.apache.shiro.lang.util.Destroyable;
+import org.apache.shiro.lang.util.Initializable;
 
 
 class LifecycleTypeListener implements TypeListener {
diff --git a/support/guice/src/main/java/org/apache/shiro/guice/ShiroModule.java b/support/guice/src/main/java/org/apache/shiro/guice/ShiroModule.java
index 3abbe95..203080b 100644
--- a/support/guice/src/main/java/org/apache/shiro/guice/ShiroModule.java
+++ b/support/guice/src/main/java/org/apache/shiro/guice/ShiroModule.java
@@ -43,8 +43,8 @@ import org.apache.shiro.mgt.SecurityManager;
 import org.apache.shiro.realm.Realm;
 import org.apache.shiro.session.mgt.DefaultSessionManager;
 import org.apache.shiro.session.mgt.SessionManager;
-import org.apache.shiro.util.ClassUtils;
-import org.apache.shiro.util.Destroyable;
+import org.apache.shiro.lang.util.ClassUtils;
+import org.apache.shiro.lang.util.Destroyable;
 
 import com.google.inject.Key;
 import com.google.inject.PrivateModule;
@@ -182,7 +182,7 @@ public abstract class ShiroModule extends PrivateModule implements Destroyable {
     }
 
     /**
-     * Destroys all beans created within this module that implement {@link org.apache.shiro.util.Destroyable}.  Should be called when this
+     * Destroys all beans created within this module that implement {@link org.apache.shiro.lang.util.Destroyable}.  Should be called when this
      * module will no longer be used.
      *
      * @throws Exception
diff --git a/support/guice/src/main/java/org/apache/shiro/guice/web/ShiroWebModule.java b/support/guice/src/main/java/org/apache/shiro/guice/web/ShiroWebModule.java
index 0bda765..b8f63e9 100644
--- a/support/guice/src/main/java/org/apache/shiro/guice/web/ShiroWebModule.java
+++ b/support/guice/src/main/java/org/apache/shiro/guice/web/ShiroWebModule.java
@@ -28,7 +28,7 @@ import org.apache.shiro.env.Environment;
 import org.apache.shiro.guice.ShiroModule;
 import org.apache.shiro.mgt.SecurityManager;
 import org.apache.shiro.session.mgt.SessionManager;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 import org.apache.shiro.web.env.WebEnvironment;
 import org.apache.shiro.web.filter.PathMatchingFilter;
 import org.apache.shiro.web.filter.authc.AnonymousFilter;
diff --git a/support/guice/src/test/java/org/apache/shiro/guice/BeanTypeListenerTest.java b/support/guice/src/test/java/org/apache/shiro/guice/BeanTypeListenerTest.java
index b934431..68e178d 100644
--- a/support/guice/src/test/java/org/apache/shiro/guice/BeanTypeListenerTest.java
+++ b/support/guice/src/test/java/org/apache/shiro/guice/BeanTypeListenerTest.java
@@ -26,7 +26,7 @@ import org.apache.shiro.guice.aop.ShiroAopModule;
 import org.apache.shiro.guice.web.ShiroWebModule;
 import org.apache.shiro.SecurityUtils;
 import org.apache.shiro.aop.DefaultAnnotationResolver;
-import org.apache.shiro.crypto.BlowfishCipherService;
+import org.apache.shiro.crypto.cipher.BlowfishCipherService;
 import org.easymock.Capture;
 import org.easymock.IMocksControl;
 import org.junit.Test;
diff --git a/support/guice/src/test/java/org/apache/shiro/guice/DestroyableInjectionListenerTest.java b/support/guice/src/test/java/org/apache/shiro/guice/DestroyableInjectionListenerTest.java
index efd652a..414ea54 100644
--- a/support/guice/src/test/java/org/apache/shiro/guice/DestroyableInjectionListenerTest.java
+++ b/support/guice/src/test/java/org/apache/shiro/guice/DestroyableInjectionListenerTest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.guice;
 
-import org.apache.shiro.util.Destroyable;
+import org.apache.shiro.lang.util.Destroyable;
 import org.junit.Test;
 
 import static org.easymock.EasyMock.*;
diff --git a/support/guice/src/test/java/org/apache/shiro/guice/InitializableInjectionListenerTest.java b/support/guice/src/test/java/org/apache/shiro/guice/InitializableInjectionListenerTest.java
index bbecfaa..6e8807c 100644
--- a/support/guice/src/test/java/org/apache/shiro/guice/InitializableInjectionListenerTest.java
+++ b/support/guice/src/test/java/org/apache/shiro/guice/InitializableInjectionListenerTest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.guice;
 
-import org.apache.shiro.util.Initializable;
+import org.apache.shiro.lang.util.Initializable;
 import org.junit.Test;
 
 import static org.easymock.EasyMock.*;
diff --git a/support/guice/src/test/java/org/apache/shiro/guice/LifecycleTypeListenerTest.java b/support/guice/src/test/java/org/apache/shiro/guice/LifecycleTypeListenerTest.java
index aff8580..174153e 100644
--- a/support/guice/src/test/java/org/apache/shiro/guice/LifecycleTypeListenerTest.java
+++ b/support/guice/src/test/java/org/apache/shiro/guice/LifecycleTypeListenerTest.java
@@ -20,9 +20,9 @@ package org.apache.shiro.guice;
 
 import com.google.inject.TypeLiteral;
 import com.google.inject.spi.TypeEncounter;
-import org.apache.shiro.ShiroException;
-import org.apache.shiro.util.Destroyable;
-import org.apache.shiro.util.Initializable;
+import org.apache.shiro.lang.ShiroException;
+import org.apache.shiro.lang.util.Destroyable;
+import org.apache.shiro.lang.util.Initializable;
 import org.junit.Test;
 
 import static org.easymock.EasyMock.*;
diff --git a/support/guice/src/test/java/org/apache/shiro/guice/ShiroModuleTest.java b/support/guice/src/test/java/org/apache/shiro/guice/ShiroModuleTest.java
index 526f4f7..03aeb28 100644
--- a/support/guice/src/test/java/org/apache/shiro/guice/ShiroModuleTest.java
+++ b/support/guice/src/test/java/org/apache/shiro/guice/ShiroModuleTest.java
@@ -31,23 +31,19 @@ import org.apache.shiro.env.Environment;
 import org.apache.shiro.event.EventBus;
 import org.apache.shiro.event.EventBusAware;
 import org.apache.shiro.event.Subscribe;
-import org.apache.shiro.event.support.DefaultEventBus;
 import org.apache.shiro.mgt.DefaultSecurityManager;
 import org.apache.shiro.mgt.SecurityManager;
 import org.apache.shiro.realm.Realm;
 import org.apache.shiro.session.mgt.DefaultSessionManager;
 import org.apache.shiro.session.mgt.SessionManager;
 import org.apache.shiro.subject.Subject;
-import org.apache.shiro.util.Destroyable;
+import org.apache.shiro.lang.util.Destroyable;
 import org.junit.Test;
 
-import java.lang.reflect.Field;
 import java.util.Collection;
-import java.util.Map;
 
 import static org.easymock.EasyMock.*;
 import static org.junit.Assert.*;
-import static org.hamcrest.Matchers.*;
 
 public class ShiroModuleTest {
 
diff --git a/support/hazelcast/pom.xml b/support/hazelcast/pom.xml
index b5d3bb8..955e9a9 100644
--- a/support/hazelcast/pom.xml
+++ b/support/hazelcast/pom.xml
@@ -70,7 +70,7 @@
                         <Bundle-SymbolicName>org.apache.shiro.hazelcast</Bundle-SymbolicName>
                         <Export-Package>org.apache.shiro.hazelcast*;version=${project.version}</Export-Package>
                         <Import-Package>
-                            org.apache.shiro*;version="${shiro.osgi.importRange}",
+                            org.apache.shiro.cache*;version="${shiro.osgi.importRange}",
                             com.hazelcast*;version="${hazelcast.osgi.importRange}",
                             *
                         </Import-Package>
diff --git a/support/hazelcast/src/main/java/org/apache/shiro/hazelcast/cache/HazelcastCacheManager.java b/support/hazelcast/src/main/java/org/apache/shiro/hazelcast/cache/HazelcastCacheManager.java
index a9e69de..91fcd9a 100644
--- a/support/hazelcast/src/main/java/org/apache/shiro/hazelcast/cache/HazelcastCacheManager.java
+++ b/support/hazelcast/src/main/java/org/apache/shiro/hazelcast/cache/HazelcastCacheManager.java
@@ -21,13 +21,13 @@ package org.apache.shiro.hazelcast.cache;
 import com.hazelcast.config.Config;
 import com.hazelcast.core.Hazelcast;
 import com.hazelcast.core.HazelcastInstance;
-import org.apache.shiro.ShiroException;
+import org.apache.shiro.lang.ShiroException;
 import org.apache.shiro.cache.Cache;
 import org.apache.shiro.cache.CacheException;
 import org.apache.shiro.cache.CacheManager;
 import org.apache.shiro.cache.MapCache;
-import org.apache.shiro.util.Destroyable;
-import org.apache.shiro.util.Initializable;
+import org.apache.shiro.lang.util.Destroyable;
+import org.apache.shiro.lang.util.Initializable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/support/spring/src/main/java/org/apache/shiro/spring/LifecycleBeanPostProcessor.java b/support/spring/src/main/java/org/apache/shiro/spring/LifecycleBeanPostProcessor.java
index a318d20..7fbe263 100644
--- a/support/spring/src/main/java/org/apache/shiro/spring/LifecycleBeanPostProcessor.java
+++ b/support/spring/src/main/java/org/apache/shiro/spring/LifecycleBeanPostProcessor.java
@@ -26,14 +26,14 @@ import org.springframework.core.PriorityOrdered;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.shiro.util.Destroyable;
-import org.apache.shiro.util.Initializable;
+import org.apache.shiro.lang.util.Destroyable;
+import org.apache.shiro.lang.util.Initializable;
 
 
 /**
  * <p>Bean post processor for Spring that automatically calls the <tt>init()</tt> and/or
- * <tt>destroy()</tt> methods on Shiro objects that implement the {@link org.apache.shiro.util.Initializable}
- * or {@link org.apache.shiro.util.Destroyable} interfaces, respectfully.  This post processor makes it easier
+ * <tt>destroy()</tt> methods on Shiro objects that implement the {@link org.apache.shiro.lang.util.Initializable}
+ * or {@link org.apache.shiro.lang.util.Destroyable} interfaces, respectfully.  This post processor makes it easier
  * to configure Shiro beans in Spring, since the user never has to worry about whether or not if they
  * have to specify init-method and destroy-method bean attributes.</p>
  *
@@ -72,7 +72,7 @@ public class LifecycleBeanPostProcessor implements DestructionAwareBeanPostProce
     }
 
     /**
-     * Calls the <tt>init()</tt> methods on the bean if it implements {@link org.apache.shiro.util.Initializable}
+     * Calls the <tt>init()</tt> methods on the bean if it implements {@link org.apache.shiro.lang.util.Initializable}
      *
      * @param object the object being initialized.
      * @param name   the name of the bean being initialized.
@@ -105,7 +105,7 @@ public class LifecycleBeanPostProcessor implements DestructionAwareBeanPostProce
 
 
     /**
-     * Calls the <tt>destroy()</tt> methods on the bean if it implements {@link org.apache.shiro.util.Destroyable}
+     * Calls the <tt>destroy()</tt> methods on the bean if it implements {@link org.apache.shiro.lang.util.Destroyable}
      *
      * @param object the object being initialized.
      * @param name   the name of the bean being initialized.
diff --git a/support/spring/src/main/java/org/apache/shiro/spring/ShiroEventBusBeanPostProcessor.java b/support/spring/src/main/java/org/apache/shiro/spring/ShiroEventBusBeanPostProcessor.java
index 64a40cf..531b59b 100644
--- a/support/spring/src/main/java/org/apache/shiro/spring/ShiroEventBusBeanPostProcessor.java
+++ b/support/spring/src/main/java/org/apache/shiro/spring/ShiroEventBusBeanPostProcessor.java
@@ -21,7 +21,7 @@ package org.apache.shiro.spring;
 import org.apache.shiro.event.EventBus;
 import org.apache.shiro.event.EventBusAware;
 import org.apache.shiro.event.Subscribe;
-import org.apache.shiro.util.ClassUtils;
+import org.apache.shiro.lang.util.ClassUtils;
 import org.apache.shiro.util.CollectionUtils;
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.config.BeanPostProcessor;
diff --git a/support/spring/src/main/java/org/apache/shiro/spring/web/ShiroFilterFactoryBean.java b/support/spring/src/main/java/org/apache/shiro/spring/web/ShiroFilterFactoryBean.java
index 5f006a1..1cd7a66 100644
--- a/support/spring/src/main/java/org/apache/shiro/spring/web/ShiroFilterFactoryBean.java
+++ b/support/spring/src/main/java/org/apache/shiro/spring/web/ShiroFilterFactoryBean.java
@@ -21,8 +21,8 @@ package org.apache.shiro.spring.web;
 import org.apache.shiro.config.Ini;
 import org.apache.shiro.mgt.SecurityManager;
 import org.apache.shiro.util.CollectionUtils;
-import org.apache.shiro.util.Nameable;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.Nameable;
+import org.apache.shiro.lang.util.StringUtils;
 import org.apache.shiro.web.config.IniFilterChainResolverFactory;
 import org.apache.shiro.web.filter.AccessControlFilter;
 import org.apache.shiro.web.filter.authc.AuthenticationFilter;
diff --git a/tools/hasher/src/main/java/org/apache/shiro/tools/hasher/Hasher.java b/tools/hasher/src/main/java/org/apache/shiro/tools/hasher/Hasher.java
index 954ef8b..e203153 100644
--- a/tools/hasher/src/main/java/org/apache/shiro/tools/hasher/Hasher.java
+++ b/tools/hasher/src/main/java/org/apache/shiro/tools/hasher/Hasher.java
@@ -25,8 +25,8 @@ import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
 import org.apache.commons.cli.DefaultParser;
 import org.apache.shiro.authc.credential.DefaultPasswordService;
-import org.apache.shiro.codec.Base64;
-import org.apache.shiro.codec.Hex;
+import org.apache.shiro.lang.codec.Base64;
+import org.apache.shiro.lang.codec.Hex;
 import org.apache.shiro.crypto.SecureRandomNumberGenerator;
 import org.apache.shiro.crypto.UnknownAlgorithmException;
 import org.apache.shiro.crypto.hash.DefaultHashService;
@@ -38,9 +38,9 @@ import org.apache.shiro.crypto.hash.format.HashFormat;
 import org.apache.shiro.crypto.hash.format.HashFormatFactory;
 import org.apache.shiro.crypto.hash.format.HexFormat;
 import org.apache.shiro.crypto.hash.format.Shiro1CryptFormat;
-import org.apache.shiro.io.ResourceUtils;
-import org.apache.shiro.util.ByteSource;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.io.ResourceUtils;
+import org.apache.shiro.lang.util.ByteSource;
+import org.apache.shiro.lang.util.StringUtils;
 
 import java.io.File;
 import java.io.IOException;
diff --git a/web/src/main/java/org/apache/shiro/web/config/IniFilterChainResolverFactory.java b/web/src/main/java/org/apache/shiro/web/config/IniFilterChainResolverFactory.java
index fb9f822..f858da8 100644
--- a/web/src/main/java/org/apache/shiro/web/config/IniFilterChainResolverFactory.java
+++ b/web/src/main/java/org/apache/shiro/web/config/IniFilterChainResolverFactory.java
@@ -19,11 +19,11 @@
 package org.apache.shiro.web.config;
 
 import org.apache.shiro.config.Ini;
-import org.apache.shiro.config.IniFactorySupport;
-import org.apache.shiro.config.IniSecurityManagerFactory;
-import org.apache.shiro.config.ReflectionBuilder;
+import org.apache.shiro.ini.IniFactorySupport;
+import org.apache.shiro.ini.IniSecurityManagerFactory;
+import org.apache.shiro.config.ogdl.ReflectionBuilder;
 import org.apache.shiro.util.CollectionUtils;
-import org.apache.shiro.util.Factory;
+import org.apache.shiro.lang.util.Factory;
 import org.apache.shiro.web.filter.mgt.FilterChainManager;
 import org.apache.shiro.web.filter.mgt.FilterChainResolver;
 import org.apache.shiro.web.filter.mgt.PathMatchingFilterChainResolver;
diff --git a/web/src/main/java/org/apache/shiro/web/config/WebIniSecurityManagerFactory.java b/web/src/main/java/org/apache/shiro/web/config/WebIniSecurityManagerFactory.java
index 30789fc..6c20d3d 100644
--- a/web/src/main/java/org/apache/shiro/web/config/WebIniSecurityManagerFactory.java
+++ b/web/src/main/java/org/apache/shiro/web/config/WebIniSecurityManagerFactory.java
@@ -19,7 +19,7 @@
 package org.apache.shiro.web.config;
 
 import org.apache.shiro.config.Ini;
-import org.apache.shiro.config.IniSecurityManagerFactory;
+import org.apache.shiro.ini.IniSecurityManagerFactory;
 import org.apache.shiro.mgt.SecurityManager;
 import org.apache.shiro.web.filter.mgt.DefaultFilter;
 import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
diff --git a/web/src/main/java/org/apache/shiro/web/env/EnvironmentLoader.java b/web/src/main/java/org/apache/shiro/web/env/EnvironmentLoader.java
index c263e38..9a3d9b5 100644
--- a/web/src/main/java/org/apache/shiro/web/env/EnvironmentLoader.java
+++ b/web/src/main/java/org/apache/shiro/web/env/EnvironmentLoader.java
@@ -20,10 +20,10 @@ package org.apache.shiro.web.env;
 
 import org.apache.shiro.config.ConfigurationException;
 import org.apache.shiro.config.ResourceConfigurable;
-import org.apache.shiro.util.ClassUtils;
-import org.apache.shiro.util.LifecycleUtils;
-import org.apache.shiro.util.StringUtils;
-import org.apache.shiro.util.UnknownClassException;
+import org.apache.shiro.lang.util.ClassUtils;
+import org.apache.shiro.lang.util.LifecycleUtils;
+import org.apache.shiro.lang.util.StringUtils;
+import org.apache.shiro.lang.util.UnknownClassException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/web/src/main/java/org/apache/shiro/web/env/IniWebEnvironment.java b/web/src/main/java/org/apache/shiro/web/env/IniWebEnvironment.java
index 6bef199..9d6219e 100644
--- a/web/src/main/java/org/apache/shiro/web/env/IniWebEnvironment.java
+++ b/web/src/main/java/org/apache/shiro/web/env/IniWebEnvironment.java
@@ -20,9 +20,13 @@ package org.apache.shiro.web.env;
 
 import org.apache.shiro.config.ConfigurationException;
 import org.apache.shiro.config.Ini;
-import org.apache.shiro.config.IniFactorySupport;
-import org.apache.shiro.io.ResourceUtils;
-import org.apache.shiro.util.*;
+import org.apache.shiro.ini.IniFactorySupport;
+import org.apache.shiro.lang.io.ResourceUtils;
+import org.apache.shiro.lang.util.Destroyable;
+import org.apache.shiro.lang.util.Factory;
+import org.apache.shiro.lang.util.Initializable;
+import org.apache.shiro.lang.util.StringUtils;
+import org.apache.shiro.util.CollectionUtils;
 import org.apache.shiro.web.config.IniFilterChainResolverFactory;
 import org.apache.shiro.web.config.WebIniSecurityManagerFactory;
 import org.apache.shiro.web.filter.mgt.FilterChainResolver;
@@ -317,7 +321,7 @@ public class IniWebEnvironment extends ResourceBasedWebEnvironment implements In
     /**
      * Converts the specified file path to an {@link Ini} instance.
      * <p/>
-     * If the path does not have a resource prefix as defined by {@link org.apache.shiro.io.ResourceUtils#hasResourcePrefix(String)}, the
+     * If the path does not have a resource prefix as defined by {@link org.apache.shiro.lang.io.ResourceUtils#hasResourcePrefix(String)}, the
      * path is expected to be resolvable by the {@code ServletContext} via
      * {@link javax.servlet.ServletContext#getResourceAsStream(String)}.
      *
diff --git a/web/src/main/java/org/apache/shiro/web/env/ResourceBasedWebEnvironment.java b/web/src/main/java/org/apache/shiro/web/env/ResourceBasedWebEnvironment.java
index e0d826a..c747c55 100644
--- a/web/src/main/java/org/apache/shiro/web/env/ResourceBasedWebEnvironment.java
+++ b/web/src/main/java/org/apache/shiro/web/env/ResourceBasedWebEnvironment.java
@@ -19,7 +19,7 @@
 package org.apache.shiro.web.env;
 
 import org.apache.shiro.config.ResourceConfigurable;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 
 /**
  * Abstract implementation for {@code WebEnvironment}s that can be initialized via resource paths (config files).
diff --git a/web/src/main/java/org/apache/shiro/web/filter/PathMatchingFilter.java b/web/src/main/java/org/apache/shiro/web/filter/PathMatchingFilter.java
index be1da71..7d4df31 100644
--- a/web/src/main/java/org/apache/shiro/web/filter/PathMatchingFilter.java
+++ b/web/src/main/java/org/apache/shiro/web/filter/PathMatchingFilter.java
@@ -20,7 +20,6 @@ package org.apache.shiro.web.filter;
 
 import org.apache.shiro.util.AntPathMatcher;
 import org.apache.shiro.util.PatternMatcher;
-import org.apache.shiro.util.StringUtils;
 import org.apache.shiro.web.servlet.AdviceFilter;
 import org.apache.shiro.web.util.WebUtils;
 import org.owasp.encoder.Encode;
@@ -33,7 +32,7 @@ import javax.servlet.ServletResponse;
 import java.util.LinkedHashMap;
 import java.util.Map;
 
-import static org.apache.shiro.util.StringUtils.split;
+import static org.apache.shiro.lang.util.StringUtils.split;
 
 /**
  * <p>Base class for Filters that will process only specified paths and allow all others to pass through.</p>
diff --git a/web/src/main/java/org/apache/shiro/web/filter/authc/BasicHttpAuthenticationFilter.java b/web/src/main/java/org/apache/shiro/web/filter/authc/BasicHttpAuthenticationFilter.java
index 7a23d9e..015e692 100644
--- a/web/src/main/java/org/apache/shiro/web/filter/authc/BasicHttpAuthenticationFilter.java
+++ b/web/src/main/java/org/apache/shiro/web/filter/authc/BasicHttpAuthenticationFilter.java
@@ -19,18 +19,13 @@
 package org.apache.shiro.web.filter.authc;
 
 import org.apache.shiro.authc.AuthenticationToken;
-import org.apache.shiro.codec.Base64;
-import org.apache.shiro.web.util.WebUtils;
+import org.apache.shiro.lang.codec.Base64;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.util.HashSet;
-import java.util.Locale;
-import java.util.Set;
 
 
 /**
diff --git a/web/src/main/java/org/apache/shiro/web/filter/authc/LogoutFilter.java b/web/src/main/java/org/apache/shiro/web/filter/authc/LogoutFilter.java
index e1da70e..3740954 100644
--- a/web/src/main/java/org/apache/shiro/web/filter/authc/LogoutFilter.java
+++ b/web/src/main/java/org/apache/shiro/web/filter/authc/LogoutFilter.java
@@ -21,7 +21,6 @@ package org.apache.shiro.web.filter.authc;
 import org.apache.shiro.SecurityUtils;
 import org.apache.shiro.session.SessionException;
 import org.apache.shiro.subject.Subject;
-import org.apache.shiro.util.StringUtils;
 import org.apache.shiro.web.servlet.AdviceFilter;
 import org.apache.shiro.web.util.WebUtils;
 import org.slf4j.Logger;
@@ -33,8 +32,6 @@ import javax.servlet.http.HttpServletResponse;
 
 import java.util.Locale;
 
-import static org.apache.shiro.web.filter.mgt.DefaultFilter.logout;
-
 /**
  * Simple Filter that, upon receiving a request, will immediately log-out the currently executing
  * {@link #getSubject(javax.servlet.ServletRequest, javax.servlet.ServletResponse) subject}
diff --git a/web/src/main/java/org/apache/shiro/web/filter/authz/AuthorizationFilter.java b/web/src/main/java/org/apache/shiro/web/filter/authz/AuthorizationFilter.java
index 8500cbe..8066c8d 100644
--- a/web/src/main/java/org/apache/shiro/web/filter/authz/AuthorizationFilter.java
+++ b/web/src/main/java/org/apache/shiro/web/filter/authz/AuthorizationFilter.java
@@ -19,7 +19,7 @@
 package org.apache.shiro.web.filter.authz;
 
 import org.apache.shiro.subject.Subject;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 import org.apache.shiro.web.filter.AccessControlFilter;
 import org.apache.shiro.web.util.WebUtils;
 
diff --git a/web/src/main/java/org/apache/shiro/web/filter/authz/HostFilter.java b/web/src/main/java/org/apache/shiro/web/filter/authz/HostFilter.java
index c215741..3dbd07d 100644
--- a/web/src/main/java/org/apache/shiro/web/filter/authz/HostFilter.java
+++ b/web/src/main/java/org/apache/shiro/web/filter/authz/HostFilter.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.web.filter.authz;
 
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
diff --git a/web/src/main/java/org/apache/shiro/web/filter/authz/HttpMethodPermissionFilter.java b/web/src/main/java/org/apache/shiro/web/filter/authz/HttpMethodPermissionFilter.java
index c06271e..f646c8e 100644
--- a/web/src/main/java/org/apache/shiro/web/filter/authz/HttpMethodPermissionFilter.java
+++ b/web/src/main/java/org/apache/shiro/web/filter/authz/HttpMethodPermissionFilter.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.web.filter.authz;
 
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/web/src/main/java/org/apache/shiro/web/filter/authz/IpFilter.java b/web/src/main/java/org/apache/shiro/web/filter/authz/IpFilter.java
index c5bd4a9..8528aa2 100644
--- a/web/src/main/java/org/apache/shiro/web/filter/authz/IpFilter.java
+++ b/web/src/main/java/org/apache/shiro/web/filter/authz/IpFilter.java
@@ -18,15 +18,11 @@
  */
 package org.apache.shiro.web.filter.authz;
 
-import org.apache.shiro.config.ConfigurationException;
-import org.apache.shiro.util.StringUtils;
-import org.apache.shiro.web.util.WebUtils;
+import org.apache.shiro.lang.util.StringUtils;
 
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
 
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
diff --git a/web/src/main/java/org/apache/shiro/web/filter/authz/PortFilter.java b/web/src/main/java/org/apache/shiro/web/filter/authz/PortFilter.java
index 14dfd58..b4596ba 100644
--- a/web/src/main/java/org/apache/shiro/web/filter/authz/PortFilter.java
+++ b/web/src/main/java/org/apache/shiro/web/filter/authz/PortFilter.java
@@ -19,7 +19,7 @@
 package org.apache.shiro.web.filter.authz;
 
 import org.apache.shiro.config.ConfigurationException;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 import org.apache.shiro.web.util.WebUtils;
 
 import javax.servlet.ServletRequest;
diff --git a/web/src/main/java/org/apache/shiro/web/filter/mgt/DefaultFilter.java b/web/src/main/java/org/apache/shiro/web/filter/mgt/DefaultFilter.java
index a023feb..b966c21 100644
--- a/web/src/main/java/org/apache/shiro/web/filter/mgt/DefaultFilter.java
+++ b/web/src/main/java/org/apache/shiro/web/filter/mgt/DefaultFilter.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.web.filter.mgt;
 
-import org.apache.shiro.util.ClassUtils;
+import org.apache.shiro.lang.util.ClassUtils;
 import org.apache.shiro.web.filter.authc.*;
 import org.apache.shiro.web.filter.authz.*;
 import org.apache.shiro.web.filter.session.NoSessionCreationFilter;
diff --git a/web/src/main/java/org/apache/shiro/web/filter/mgt/DefaultFilterChainManager.java b/web/src/main/java/org/apache/shiro/web/filter/mgt/DefaultFilterChainManager.java
index a880108..6a1468c 100644
--- a/web/src/main/java/org/apache/shiro/web/filter/mgt/DefaultFilterChainManager.java
+++ b/web/src/main/java/org/apache/shiro/web/filter/mgt/DefaultFilterChainManager.java
@@ -20,8 +20,8 @@ package org.apache.shiro.web.filter.mgt;
 
 import org.apache.shiro.config.ConfigurationException;
 import org.apache.shiro.util.CollectionUtils;
-import org.apache.shiro.util.Nameable;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.Nameable;
+import org.apache.shiro.lang.util.StringUtils;
 import org.apache.shiro.web.filter.PathConfigProcessor;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
diff --git a/web/src/main/java/org/apache/shiro/web/filter/mgt/FilterChainManager.java b/web/src/main/java/org/apache/shiro/web/filter/mgt/FilterChainManager.java
index ebbc716..8f8461f 100644
--- a/web/src/main/java/org/apache/shiro/web/filter/mgt/FilterChainManager.java
+++ b/web/src/main/java/org/apache/shiro/web/filter/mgt/FilterChainManager.java
@@ -107,7 +107,7 @@ public interface FilterChainManager {
      * <h3>Conventional Use</h3>
      * Because the {@code FilterChainManager} interface does not impose any restrictions on filter chain names,
      * (it expects only Strings), a convenient convention is to make the chain name an actual URL path expression
-     * (such as an {@link org.apache.shiro.util.AntPathMatcher Ant path expression}).  For example:
+     * (such as an {@link org.apache.shiro.lang.util.AntPathMatcher Ant path expression}).  For example:
      * <p/>
      * <code>createChain(<b><em>path_expression</em></b>, <em>path_specific_filter_chain_definition</em>);</code>
      * This convention can be used by a {@link FilterChainResolver} to inspect request URL paths
@@ -160,7 +160,7 @@ public interface FilterChainManager {
      * @param chainDefinition the string-formatted chain definition used to construct an actual
      *                        {@link NamedFilterList} chain instance.
      * @see FilterChainResolver
-     * @see org.apache.shiro.util.AntPathMatcher AntPathMatcher
+     * @see org.apache.shiro.lang.util.AntPathMatcher AntPathMatcher
      */
     void createChain(String chainName, String chainDefinition);
 
diff --git a/web/src/main/java/org/apache/shiro/web/filter/mgt/PathMatchingFilterChainResolver.java b/web/src/main/java/org/apache/shiro/web/filter/mgt/PathMatchingFilterChainResolver.java
index c35ab9b..7583060 100644
--- a/web/src/main/java/org/apache/shiro/web/filter/mgt/PathMatchingFilterChainResolver.java
+++ b/web/src/main/java/org/apache/shiro/web/filter/mgt/PathMatchingFilterChainResolver.java
@@ -22,7 +22,6 @@ import org.apache.shiro.util.AntPathMatcher;
 import org.apache.shiro.util.PatternMatcher;
 import org.apache.shiro.web.util.WebUtils;
 import org.owasp.encoder.Encode;
-import org.owasp.encoder.Encoder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -33,7 +32,7 @@ import javax.servlet.ServletResponse;
 
 /**
  * A {@code FilterChainResolver} that resolves {@link FilterChain}s based on url path
- * matching, as determined by a configurable {@link #setPathMatcher(org.apache.shiro.util.PatternMatcher) PathMatcher}.
+ * matching, as determined by a configurable {@link #setPathMatcher(org.apache.shiro.lang.util.PatternMatcher) PathMatcher}.
  * <p/>
  * This implementation functions by consulting a {@link org.apache.shiro.web.filter.mgt.FilterChainManager} for all configured filter chains (keyed
  * by configured path pattern).  If an incoming Request path matches one of the configured path patterns (via
@@ -64,7 +63,7 @@ public class PathMatchingFilterChainResolver implements FilterChainResolver {
     /**
      * Returns the {@code PatternMatcher} used when determining if an incoming request's path
      * matches a configured filter chain.  Unless overridden, the
-     * default implementation is an {@link org.apache.shiro.util.AntPathMatcher AntPathMatcher}.
+     * default implementation is an {@link org.apache.shiro.lang.util.AntPathMatcher AntPathMatcher}.
      *
      * @return the {@code PatternMatcher} used when determining if an incoming request's path
      *         matches a configured filter chain.
@@ -76,7 +75,7 @@ public class PathMatchingFilterChainResolver implements FilterChainResolver {
     /**
      * Sets the {@code PatternMatcher} used when determining if an incoming request's path
      * matches a configured filter chain.  Unless overridden, the
-     * default implementation is an {@link org.apache.shiro.util.AntPathMatcher AntPathMatcher}.
+     * default implementation is an {@link org.apache.shiro.lang.util.AntPathMatcher AntPathMatcher}.
      *
      * @param pathMatcher the {@code PatternMatcher} used when determining if an incoming request's path
      *                    matches a configured filter chain.
@@ -137,7 +136,7 @@ public class PathMatchingFilterChainResolver implements FilterChainResolver {
      * matches a configured filter chain path (the {@code pattern} argument), {@code false} otherwise.
      * <p/>
      * Simply delegates to
-     * <b><code>{@link #getPathMatcher() getPathMatcher()}.{@link org.apache.shiro.util.PatternMatcher#matches(String, String) matches(pattern,path)}</code></b>.
+     * <b><code>{@link #getPathMatcher() getPathMatcher()}.{@link org.apache.shiro.lang.util.PatternMatcher#matches(String, String) matches(pattern,path)}</code></b>.
      * Subclass implementors should think carefully before overriding this method, as typically a custom
      * {@code PathMatcher} should be configured for custom path matching behavior instead.  Favor OO composition
      * rather than inheritance to limit your exposure to Shiro implementation details which may change over time.
diff --git a/web/src/main/java/org/apache/shiro/web/filter/mgt/SimpleNamedFilterList.java b/web/src/main/java/org/apache/shiro/web/filter/mgt/SimpleNamedFilterList.java
index a0bf79d..5df1b99 100644
--- a/web/src/main/java/org/apache/shiro/web/filter/mgt/SimpleNamedFilterList.java
+++ b/web/src/main/java/org/apache/shiro/web/filter/mgt/SimpleNamedFilterList.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.web.filter.mgt;
 
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 import org.apache.shiro.web.servlet.ProxiedFilterChain;
 
 import javax.servlet.Filter;
diff --git a/web/src/main/java/org/apache/shiro/web/mgt/CookieRememberMeManager.java b/web/src/main/java/org/apache/shiro/web/mgt/CookieRememberMeManager.java
index 798bf40..e6b3503 100644
--- a/web/src/main/java/org/apache/shiro/web/mgt/CookieRememberMeManager.java
+++ b/web/src/main/java/org/apache/shiro/web/mgt/CookieRememberMeManager.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.web.mgt;
 
-import org.apache.shiro.codec.Base64;
+import org.apache.shiro.lang.codec.Base64;
 import org.apache.shiro.mgt.AbstractRememberMeManager;
 import org.apache.shiro.subject.Subject;
 import org.apache.shiro.subject.SubjectContext;
diff --git a/web/src/main/java/org/apache/shiro/web/mgt/DefaultWebSecurityManager.java b/web/src/main/java/org/apache/shiro/web/mgt/DefaultWebSecurityManager.java
index d010290..f0fb938 100644
--- a/web/src/main/java/org/apache/shiro/web/mgt/DefaultWebSecurityManager.java
+++ b/web/src/main/java/org/apache/shiro/web/mgt/DefaultWebSecurityManager.java
@@ -28,7 +28,7 @@ import org.apache.shiro.session.mgt.SessionKey;
 import org.apache.shiro.session.mgt.SessionManager;
 import org.apache.shiro.subject.Subject;
 import org.apache.shiro.subject.SubjectContext;
-import org.apache.shiro.util.LifecycleUtils;
+import org.apache.shiro.lang.util.LifecycleUtils;
 import org.apache.shiro.web.servlet.ShiroHttpServletRequest;
 import org.apache.shiro.web.session.mgt.*;
 import org.apache.shiro.web.subject.WebSubject;
diff --git a/web/src/main/java/org/apache/shiro/web/servlet/AbstractFilter.java b/web/src/main/java/org/apache/shiro/web/servlet/AbstractFilter.java
index 9bc7189..acc91e0 100644
--- a/web/src/main/java/org/apache/shiro/web/servlet/AbstractFilter.java
+++ b/web/src/main/java/org/apache/shiro/web/servlet/AbstractFilter.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.web.servlet;
 
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/web/src/main/java/org/apache/shiro/web/servlet/IniShiroFilter.java b/web/src/main/java/org/apache/shiro/web/servlet/IniShiroFilter.java
index b701ad1..b701aea 100644
--- a/web/src/main/java/org/apache/shiro/web/servlet/IniShiroFilter.java
+++ b/web/src/main/java/org/apache/shiro/web/servlet/IniShiroFilter.java
@@ -20,11 +20,11 @@ package org.apache.shiro.web.servlet;
 
 import org.apache.shiro.config.ConfigurationException;
 import org.apache.shiro.config.Ini;
-import org.apache.shiro.config.IniFactorySupport;
-import org.apache.shiro.io.ResourceUtils;
+import org.apache.shiro.ini.IniFactorySupport;
+import org.apache.shiro.lang.io.ResourceUtils;
 import org.apache.shiro.mgt.SecurityManager;
 import org.apache.shiro.util.CollectionUtils;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 import org.apache.shiro.web.config.IniFilterChainResolverFactory;
 import org.apache.shiro.web.config.WebIniSecurityManagerFactory;
 import org.apache.shiro.web.filter.mgt.FilterChainResolver;
diff --git a/web/src/main/java/org/apache/shiro/web/servlet/NameableFilter.java b/web/src/main/java/org/apache/shiro/web/servlet/NameableFilter.java
index de74a32..f858f2e 100644
--- a/web/src/main/java/org/apache/shiro/web/servlet/NameableFilter.java
+++ b/web/src/main/java/org/apache/shiro/web/servlet/NameableFilter.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.web.servlet;
 
-import org.apache.shiro.util.Nameable;
+import org.apache.shiro.lang.util.Nameable;
 
 import javax.servlet.FilterConfig;
 
diff --git a/web/src/main/java/org/apache/shiro/web/servlet/SimpleCookie.java b/web/src/main/java/org/apache/shiro/web/servlet/SimpleCookie.java
index d28405c..a084e4f 100644
--- a/web/src/main/java/org/apache/shiro/web/servlet/SimpleCookie.java
+++ b/web/src/main/java/org/apache/shiro/web/servlet/SimpleCookie.java
@@ -18,7 +18,7 @@
  */
 package org.apache.shiro.web.servlet;
 
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 import org.owasp.encoder.Encode;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
diff --git a/web/src/main/java/org/apache/shiro/web/session/HttpServletSession.java b/web/src/main/java/org/apache/shiro/web/session/HttpServletSession.java
index 99630a0..4acab37 100644
--- a/web/src/main/java/org/apache/shiro/web/session/HttpServletSession.java
+++ b/web/src/main/java/org/apache/shiro/web/session/HttpServletSession.java
@@ -20,7 +20,7 @@ package org.apache.shiro.web.session;
 
 import org.apache.shiro.session.InvalidSessionException;
 import org.apache.shiro.session.Session;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 import org.apache.shiro.web.servlet.ShiroHttpSession;
 
 import javax.servlet.http.HttpSession;
diff --git a/web/src/main/java/org/apache/shiro/web/subject/support/WebDelegatingSubject.java b/web/src/main/java/org/apache/shiro/web/subject/support/WebDelegatingSubject.java
index 16c1db9..3ef7def 100644
--- a/web/src/main/java/org/apache/shiro/web/subject/support/WebDelegatingSubject.java
+++ b/web/src/main/java/org/apache/shiro/web/subject/support/WebDelegatingSubject.java
@@ -23,7 +23,7 @@ import org.apache.shiro.session.Session;
 import org.apache.shiro.session.mgt.SessionContext;
 import org.apache.shiro.subject.PrincipalCollection;
 import org.apache.shiro.subject.support.DelegatingSubject;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 import org.apache.shiro.web.session.mgt.DefaultWebSessionContext;
 import org.apache.shiro.web.session.mgt.WebSessionContext;
 import org.apache.shiro.web.subject.WebSubject;
diff --git a/web/src/main/java/org/apache/shiro/web/util/WebUtils.java b/web/src/main/java/org/apache/shiro/web/util/WebUtils.java
index b9c9f62..abc27c4 100644
--- a/web/src/main/java/org/apache/shiro/web/util/WebUtils.java
+++ b/web/src/main/java/org/apache/shiro/web/util/WebUtils.java
@@ -22,7 +22,7 @@ import org.apache.shiro.SecurityUtils;
 import org.apache.shiro.session.Session;
 import org.apache.shiro.subject.Subject;
 import org.apache.shiro.subject.support.DefaultSubjectContext;
-import org.apache.shiro.util.StringUtils;
+import org.apache.shiro.lang.util.StringUtils;
 import org.apache.shiro.web.env.EnvironmentLoader;
 import org.apache.shiro.web.env.WebEnvironment;
 import org.apache.shiro.web.filter.AccessControlFilter;
diff --git a/web/src/test/groovy/org/apache/shiro/web/env/IniWebEnvironmentTest.groovy b/web/src/test/groovy/org/apache/shiro/web/env/IniWebEnvironmentTest.groovy
index 7dcb40b..25f2771 100644
--- a/web/src/test/groovy/org/apache/shiro/web/env/IniWebEnvironmentTest.groovy
+++ b/web/src/test/groovy/org/apache/shiro/web/env/IniWebEnvironmentTest.groovy
@@ -18,9 +18,9 @@
  */
 package org.apache.shiro.web.env
 
-import org.apache.shiro.config.CompositeBean
+import org.apache.shiro.config.ogdl.CompositeBean
 import org.apache.shiro.config.Ini
-import org.apache.shiro.config.SimpleBean
+import org.apache.shiro.config.ogdl.SimpleBean
 import org.apache.shiro.web.filter.mgt.DefaultFilter
 import org.junit.Test
 
@@ -42,7 +42,7 @@ class IniWebEnvironmentTest {
         def ini = new Ini()
         ini.load("""
         [main]
-        compositeBean = org.apache.shiro.config.CompositeBean
+        compositeBean = org.apache.shiro.config.ogdl.CompositeBean
         """)
         
         def env = new IniWebEnvironment(ini:  ini)
@@ -65,7 +65,7 @@ class IniWebEnvironmentTest {
         def ini = new Ini()
         ini.load("""
         [main]
-        compositeBean = org.apache.shiro.config.CompositeBean
+        compositeBean = org.apache.shiro.config.ogdl.CompositeBean
         compositeBean.simpleBean = \$simpleBean
         """)
 
@@ -73,7 +73,7 @@ class IniWebEnvironmentTest {
             @Override
             protected Ini getFrameworkIni() {
                 def frameworkIni = new Ini()
-                frameworkIni.setSectionProperty("main", "simpleBean", "org.apache.shiro.config.SimpleBean")
+                frameworkIni.setSectionProperty("main", "simpleBean", "org.apache.shiro.config.ogdl.SimpleBean")
                 return frameworkIni;
             }
         }
diff --git a/web/src/test/groovy/org/apache/shiro/web/servlet/IniShiroFilterTest.groovy b/web/src/test/groovy/org/apache/shiro/web/servlet/IniShiroFilterTest.groovy
index 10d3dd1..bc56913 100644
--- a/web/src/test/groovy/org/apache/shiro/web/servlet/IniShiroFilterTest.groovy
+++ b/web/src/test/groovy/org/apache/shiro/web/servlet/IniShiroFilterTest.groovy
@@ -21,7 +21,7 @@ package org.apache.shiro.web.servlet
 import javax.servlet.FilterConfig
 import javax.servlet.ServletContext
 import javax.servlet.ServletException
-import org.apache.shiro.io.ResourceUtils
+import org.apache.shiro.lang.io.ResourceUtils
 import org.junit.Test
 
 import static org.easymock.EasyMock.*
diff --git a/web/src/test/java/org/apache/shiro/web/config/WebIniSecurityManagerFactoryTest.java b/web/src/test/java/org/apache/shiro/web/config/WebIniSecurityManagerFactoryTest.java
index 152d788..5ec67d8 100644
--- a/web/src/test/java/org/apache/shiro/web/config/WebIniSecurityManagerFactoryTest.java
+++ b/web/src/test/java/org/apache/shiro/web/config/WebIniSecurityManagerFactoryTest.java
@@ -19,7 +19,7 @@
 package org.apache.shiro.web.config;
 
 import org.apache.shiro.config.Ini;
-import org.apache.shiro.config.IniSecurityManagerFactory;
+import org.apache.shiro.ini.IniSecurityManagerFactory;
 import org.apache.shiro.web.filter.mgt.DefaultFilter;
 import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
 import org.junit.Test;
diff --git a/web/src/test/java/org/apache/shiro/web/filter/authc/BasicHttpFilterAuthenticationTest.java b/web/src/test/java/org/apache/shiro/web/filter/authc/BasicHttpFilterAuthenticationTest.java
index afdcbd6..ef7fa26 100644
--- a/web/src/test/java/org/apache/shiro/web/filter/authc/BasicHttpFilterAuthenticationTest.java
+++ b/web/src/test/java/org/apache/shiro/web/filter/authc/BasicHttpFilterAuthenticationTest.java
@@ -31,7 +31,7 @@ import javax.servlet.http.HttpServletResponse;
 
 import org.apache.shiro.authc.AuthenticationToken;
 import org.apache.shiro.authc.UsernamePasswordToken;
-import org.apache.shiro.codec.Base64;
+import org.apache.shiro.lang.codec.Base64;
 import org.apache.shiro.test.SecurityManagerTestSupport;
 import org.junit.Before;
 import org.junit.Test;
diff --git a/web/src/test/java/org/apache/shiro/web/filter/mgt/PathMatchingFilterChainResolverTest.java b/web/src/test/java/org/apache/shiro/web/filter/mgt/PathMatchingFilterChainResolverTest.java
index 963e89e..f13e8ea 100644
--- a/web/src/test/java/org/apache/shiro/web/filter/mgt/PathMatchingFilterChainResolverTest.java
+++ b/web/src/test/java/org/apache/shiro/web/filter/mgt/PathMatchingFilterChainResolverTest.java
@@ -20,7 +20,6 @@ package org.apache.shiro.web.filter.mgt;
 
 import org.apache.shiro.util.AntPathMatcher;
 import org.apache.shiro.web.WebTest;
-import org.apache.shiro.web.util.WebUtils;
 import org.junit.Before;
 import org.junit.Test;
 
diff --git a/web/src/test/java/org/apache/shiro/web/mgt/CookieRememberMeManagerTest.java b/web/src/test/java/org/apache/shiro/web/mgt/CookieRememberMeManagerTest.java
index 9fef4c4..ada3cf6 100644
--- a/web/src/test/java/org/apache/shiro/web/mgt/CookieRememberMeManagerTest.java
+++ b/web/src/test/java/org/apache/shiro/web/mgt/CookieRememberMeManagerTest.java
@@ -21,7 +21,7 @@ package org.apache.shiro.web.mgt;
 import org.apache.shiro.authc.AuthenticationInfo;
 import org.apache.shiro.authc.SimpleAuthenticationInfo;
 import org.apache.shiro.authc.UsernamePasswordToken;
-import org.apache.shiro.codec.Base64;
+import org.apache.shiro.lang.codec.Base64;
 import org.apache.shiro.crypto.CryptoException;
 import org.apache.shiro.subject.PrincipalCollection;
 import org.apache.shiro.web.servlet.ShiroHttpServletRequest;