 	application.$wheels.cachePartials = false;
 	application.$wheels.cacheQueries = false;
 	application.$wheels.cachePlugins = true;
-	if (application.$wheels.environment != "design")
-	{
+	if (application.$wheels.environment != "design") {
 		application.$wheels.cacheDatabaseSchema = true;
 		application.$wheels.cacheFileChecking = true;
 		application.$wheels.cacheImages = true;

	$initializeRequestScope();

	// set or reset all settings but make sure to pass along the reload password between forced reloads with "reload=x"
	if (StructKeyExists(application, "wheels") && StructKeyExists(application.wheels, "reloadPassword"))
	{
		local.oldReloadPassword = application.wheels.reloadPassword;
	}
	application.$wheels = {};
	if (StructKeyExists(local, "oldReloadPassword"))
	{
		application.$wheels.reloadPassword = local.oldReloadPassword;
	}

	// check and store server engine name, throw error if using a version that we don't support
	if (StructKeyExists(server, "lucee"))
	{
		application.$wheels.serverName = "Lucee";
		application.$wheels.serverVersion = server.lucee.version;
	}
	else
	{
		application.$wheels.serverName = "Adobe ColdFusion";
		application.$wheels.serverVersion = server.coldfusion.productVersion;
	}
	local.upgradeTo = $checkMinimumVersion(engine=application.$wheels.serverName, version=application.$wheels.serverVersion);
	if (Len(local.upgradeTo) && !StructKeyExists(this, "disableEngineCheck") && !StructKeyExists(url, "disableEngineCheck"))
	{
		if (IsBoolean(local.upgradeTo))
		{
			$throw(type="Wheels.EngineNotSupported", message="#application.$wheels.serverName# #application.$wheels.serverVersion# is not supported by CFWheels.", extendedInfo="Please use Lucee or Adobe ColdFusion instead.");
		}
		else
		{
			$throw(type="Wheels.EngineNotSupported", message="#application.$wheels.serverName# #application.$wheels.serverVersion# is not supported by CFWheels.", extendedInfo="Please upgrade to version #local.upgradeTo# or higher.");
		}
	}

	application.$wheels.wheelsComponentPath = ListAppend(application.$wheels.rootcomponentPath, "wheels", ".");

	// set environment either from the url or the developer's environment.cfm file
	if (StructKeyExists(URL, "reload") && !IsBoolean(URL.reload) && Len(url.reload) && StructKeyExists(application.$wheels, "reloadPassword") && (!Len(application.$wheels.reloadPassword) || (StructKeyExists(URL, "password") && URL.password == application.$wheels.reloadPassword))) {
		application.$wheels.environment = URL.reload;
	} else {
		$include(template="config/environment.cfm");
	}

	// rewrite settings based on web server rewrite capabilites
	application.$wheels.rewriteFile = "rewrite.cfm";
	if (Right(request.cgi.script_name, 12) == "/" & application.$wheels.rewriteFile) {
		application.$wheels.URLRewriting = "On";
	} else if (Len(request.cgi.path_info)) {
		application.$wheels.URLRewriting = "Partial";
	} else {
		application.$wheels.URLRewriting = "Off";
	}

	// set datasource name to same as the folder the app resides in unless the developer has set it with the global setting already
	if (StructKeyExists(this, "dataSource")) {
		application.$wheels.dataSourceName = this.dataSource;
	} else {
		application.$wheels.dataSourceName = LCase(ListLast(GetDirectoryFromPath(GetBaseTemplatePath()), Right(GetDirectoryFromPath(GetBaseTemplatePath()), 1)));
	}
	application.$wheels.dataSourceUserName = "";
