 			arguments.perPage = 1;
 			arguments.count = 1;
 		}
-		loc.rv = findAll(argumentCollection=arguments);
-		if (IsArray(loc.rv))
-		{
-			if (ArrayLen(loc.rv))
-			{
-				loc.rv = loc.rv[1];
-			}
-			else
-			{
-				loc.rv = false;
-			}
-		}
-	</cfscript>
-	<cfreturn loc.rv>
-</cffunction>
-
-<cffunction name="findFirst" returntype="any" access="public" output="false">
-	<cfargument name="property" type="string" required="false" default="#primaryKey()#">
-	<cfargument name="$sort" type="string" required="false" default="ASC">
-	<cfscript>
-		var loc = {};
+		local.rv = findAll(argumentCollection=arguments);
+		if (IsArray(local.rv))
+		{
+			if (ArrayLen(local.rv))
+			{
+				local.rv = local.rv[1];
+			}
+			else
+			{
+				local.rv = false;
+			}
+		}
+		return local.rv;
+	}
+
+	public any function findFirst(string property="#primaryKey()#", string $sort="ASC") { 		
 		$args(args=arguments, name="findFirst", combine="property/properties");
 		arguments.order = "";
-		loc.iEnd = ListLen(arguments.property);
-		for (loc.i=1; loc.i <= loc.iEnd; loc.i++)
-		{
-			loc.item = ListGetAt(arguments.property, loc.i);
-			arguments.order = ListAppend(arguments.order, loc.item & " " & arguments.$sort);
+		local.iEnd = ListLen(arguments.property);
+		for (local.i=1; local.i <= local.iEnd; local.i++)
+		{
+			local.item = ListGetAt(arguments.property, local.i);
+			arguments.order = ListAppend(arguments.order, local.item & " " & arguments.$sort);
 		}
 		StructDelete(arguments, "property");
 		StructDelete(arguments, "$sort");
-		loc.rv = findOne(argumentCollection=arguments);
-	</cfscript>
-	<cfreturn loc.rv>
-</cffunction>
-
-<cffunction name="findLast" returntype="any" access="public" output="false">
-	<cfargument name="property" type="string" required="false">
-	<cfscript>
-		var loc = {};
+		local.rv = findOne(argumentCollection=arguments);
+		return local.rv;
+	}
+
+	public any function findLast(string property) {
 		arguments.$sort = "DESC";
-		loc.rv = findFirst(argumentCollection=arguments);
-	</cfscript>
-	<cfreturn loc.rv>
-</cffunction>
-
-<cffunction name="findAllKeys" returntype="string" access="public" output="false">
-	<cfargument name="quoted" type="boolean" required="false" default="false">
-	<cfargument name="delimiter" type="string" required="false" default=",">
-	<cfscript>
-		var loc = {};
-		loc.quoted = arguments.quoted;
+		local.rv = findFirst(argumentCollection=arguments);
+		return local.rv;
+	}
+
+	public string function findAllKeys(boolean quoted="false", string delimiter=",") {		
+		local.quoted = arguments.quoted;
 		StructDelete(arguments, "quoted");
-		loc.delimiter = arguments.delimiter;
+		local.delimiter = arguments.delimiter;
 		StructDelete(arguments, "delimiter");
 		arguments.select = primaryKey();
 		arguments.callbacks = false;
-		loc.query = findAll(argumentCollection=arguments);
-		if (loc.quoted)
-		{
-			loc.functionName = "QuotedValueList";
+		local.query = findAll(argumentCollection=arguments);
+		if (local.quoted)
+		{
+			local.functionName = "QuotedValueList";
 		}
 		else
 		{
-			loc.functionName = "ValueList";
-		}
-		loc.rv = Evaluate("#loc.functionName#(loc.query.#arguments.select#, '#loc.delimiter#')");
-	</cfscript>
-	<cfreturn loc.rv>
-</cffunction>
-
-<!--- PUBLIC MODEL OBJECT METHODS --->
-
-<cffunction name="reload" returntype="void" access="public" output="false">
-	<cfscript>
-		var loc = {};
-		loc.query = findByKey(key=key(), reload=true, returnAs="query");
-		loc.properties = propertyNames();
-		loc.iEnd = ListLen(loc.properties);
-		for (loc.i=1; loc.i <= loc.iEnd; loc.i++)
+			local.functionName = "ValueList";
+		}
+		local.rv = Evaluate("#local.functionName#(local.query.#arguments.select#, '#local.delimiter#')");	
+		return local.rv;
+	}
+
+	/*
+	* PUBLIC MODEL OBJECT METHODS
+	*/
+	public void function reload() { 
+		local.query = findByKey(key=key(), reload=true, returnAs="query");
+		local.properties = propertyNames();
+		local.iEnd = ListLen(local.properties);
+		for (local.i=1; local.i <= local.iEnd; local.i++)
 		{
 			try
 			{
 				// coldfusion has a problem with blank boolean values in the query
-				loc.property = ListGetAt(loc.properties, loc.i);
-				this[loc.property] = loc.query[loc.property][1];
+				local.property = ListGetAt(local.properties, local.i);
+				this[local.property] = local.query[local.property][1];
 			}
 			catch (any e)
 			{
-				this[loc.property] = "";
-			}
-		}
-	</cfscript>
-</cffunction>+				this[local.property] = "";
+			}
+		}
+	}
+</cfscript>
						$throw(type="Wheels.IncorrectArgumentValue", message="Incorrect Arguments", extendedInfo="The `returnAs` may be either `query`, `struct(s)` or `object(s)`");
					}
			}
		}
	</cfscript>
	<cfreturn loc.rv>
</cffunction>

<cffunction name="findByKey" returntype="any" access="public" output="false">
	<cfargument name="key" type="any" required="true">
	<cfargument name="select" type="string" required="false" default="">
	<cfargument name="include" type="string" required="false" default="">
	<cfargument name="cache" type="any" required="false" default="">
	<cfargument name="reload" type="boolean" required="false">
	<cfargument name="parameterize" type="any" required="false">
	<cfargument name="returnAs" type="string" required="false">
	<cfargument name="callbacks" type="boolean" required="false" default="true">
	<cfargument name="includeSoftDeletes" type="boolean" required="false" default="false">
	<cfscript>
		var loc = {};
		$args(name="findByKey", args=arguments);
		arguments.include = $listClean(arguments.include);
		if (Len(arguments.key))

<cfscript>
	/*
	*  PUBLIC MODEL CLASS METHODS
	*/
	
	public any function findAll(
		string where="",
		string order,
		string group,
		string select="",
		boolean distinct="false",
		string include="",
		numeric maxRows="-1",
		numeric page="0",
		numeric perPage,
		numeric count="0",
		string handle="query",
		any cache="",
		boolean reload,
		any parameterize,
		string returnAs,
		boolean returnIncluded,
		boolean callbacks="true",
		boolean includeSoftDeletes="false",
		numeric $limit="0",
		numeric $offset="0"
	) { 
		$args(name="findAll", args=arguments);
		arguments.include = $listClean(arguments.include);
		arguments.where = $cleanInList(arguments.where);
