 
 public void function onApplicationStart() {
 
-	// abort if called from incorrect file
+	// Abort if called from incorrect file.
 	$abortInvalidRequest();
 
-	// setup the wheels storage struct for the current request
+	// Setup the CFWheels storage struct for the current request.
 	$initializeRequestScope();
 
-	// set or reset all settings but make sure to pass along the reload password between forced reloads with "reload=x"
+	// 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.showDebugInformation = false;
	}

	// asset path settings
	// assetPaths can be struct with two keys,  http and https, if no https struct key, http is used for secure and non-secure
	// ex. {http="asset0.domain1.com,asset2.domain1.com,asset3.domain1.com", https="secure.domain1.com"}
	application.$wheels.assetQueryString = false;
	application.$wheels.assetPaths = false;
	if (application.$wheels.environment != "development") {
		application.$wheels.assetQueryString = true;
	}

	// configurable paths
	application.$wheels.eventPath = "events";
	application.$wheels.filePath = "files";
	application.$wheels.imagePath = "images";

		}
	}

	// Reload the plugins each time we reload the application.
	$loadPlugins();

	// Allow developers to inject plugins into the application variables scope.
	if (!StructIsEmpty(application.$wheels.mixins)) {
		$include(template="wheels/plugins/standalone/injection.cfm");
	}

	// Create the mapper that will handle creating routes.
	// Needs to be before $loadRoutes and after $loadPlugins.
	application.$wheels.mapper = $createObjectFromRoot(path="wheels", fileName="Mapper", method="$init");

	// Load developer routes and adds the default CFWheels routes (unless the developer has specified not to).
	$loadRoutes();

	// Create the dispatcher that will handle all incoming requests.
	application.$wheels.dispatch = $createObjectFromRoot(path="wheels", fileName="Dispatch", method="$init");

	// Assign it all to the application scope in one atomic call.
	application.wheels = application.$wheels;
	StructDelete(application, "$wheels");

	// Run the developer's on application start code.
	$include(template="#application.wheels.eventPath#/onapplicationstart.cfm");

	// Redirect away from reloads on GET requests.
	if (application.wheels.redirectAfterReload && StructKeyExists(url, "reload") && cgi.request_method == "get") {
		if (StructKeyExists(cgi, "path_info") && Len(cgi.path_info)) {
			local.url = cgi.path_info;
		} else if (StructKeyExists(cgi, "path_info")) {
			local.url = "/";
		} else {
			local.url = cgi.script_name;
		}
		local.oldQueryString = ListToArray(cgi.query_string, "&");
		local.newQueryString = [];
		local.iEnd = ArrayLen(local.oldQueryString);
		for (local.i = 1; local.i <= local.iEnd; local.i++) {
			local.keyValue = local.oldQueryString[local.i];
			local.key = ListFirst(local.keyValue, "=");
			if (!ListFindNoCase("reload,password", local.key)) {
				ArrayAppend(local.newQueryString, local.keyValue);
			}
		}
		if (ArrayLen(local.newQueryString)) {
			local.queryString = ArrayToList(local.newQueryString, "&");
			local.url = "#local.url#?#local.queryString#";
		}
		$location(url=local.url, addToken=false);
	}
}
