Abstracting the loading of files in the config directory depending on environments.
diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php
index 5f5d1aa..3173c98 100644
--- a/system/helpers/download_helper.php
+++ b/system/helpers/download_helper.php
@@ -70,14 +70,7 @@
 		$extension = end($x);
 
 		// Load the mime types
-		if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
-		{
-			include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php');
-		}
-		elseif (is_file(APPPATH.'config/mimes.php'))
-		{
-			include(APPPATH.'config/mimes.php');
-		}
+		load_environ_config('mimes');
 
 		// Set a default mime if we can't find it
 		if ( ! isset($mimes[$extension]))
diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php
index 5b50853..b4edcde 100644
--- a/system/helpers/file_helper.php
+++ b/system/helpers/file_helper.php
@@ -364,14 +364,7 @@
 
 		if ( ! is_array($mimes))
 		{
-			if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
-			{
-				include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php');
-			}
-			elseif (is_file(APPPATH.'config/mimes.php'))
-			{
-				include(APPPATH.'config/mimes.php');
-			}
+			load_environ_config('mimes');
 
 			if ( ! is_array($mimes))
 			{
diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php
index b6bb402..fa805f1 100644
--- a/system/helpers/html_helper.php
+++ b/system/helpers/html_helper.php
@@ -275,14 +275,7 @@
 
 		if ( ! is_array($_doctypes))
 		{
-			if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/doctypes.php'))
-			{
-				include(APPPATH.'config/'.ENVIRONMENT.'/doctypes.php');
-			}
-			elseif (is_file(APPPATH.'config/doctypes.php'))
-			{
-				include(APPPATH.'config/doctypes.php');
-			}
+			load_environ_config('doctypes');
 
 			if ( ! is_array($_doctypes))
 			{
diff --git a/system/helpers/smiley_helper.php b/system/helpers/smiley_helper.php
index 38e2965..e04d5d6 100644
--- a/system/helpers/smiley_helper.php
+++ b/system/helpers/smiley_helper.php
@@ -241,14 +241,7 @@
 {
 	function _get_smiley_array()
 	{
-		if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/smileys.php'))
-		{
-			include(APPPATH.'config/'.ENVIRONMENT.'/smileys.php');
-		}
-		elseif (file_exists(APPPATH.'config/smileys.php'))
-		{
-			include(APPPATH.'config/smileys.php');
-		}
+		load_environ_config('smileys');
 		
 		if (isset($smileys) AND is_array($smileys))
 		{
diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php
index 38b46e2..7a4a689 100644
--- a/system/helpers/text_helper.php
+++ b/system/helpers/text_helper.php
@@ -378,14 +378,7 @@
 {
 	function convert_accented_characters($str)
 	{
-		if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/foreign_chars.php'))
-		{
-			include(APPPATH.'config/'.ENVIRONMENT.'/foreign_chars.php');
-		}
-		elseif (is_file(APPPATH.'config/foreign_chars.php'))
-		{
-			include(APPPATH.'config/foreign_chars.php');
-		}
+		load_environ_config('foreign_chars');
 
 		if ( ! isset($foreign_characters))
 		{