 
 			<!-- Get all part names for this collection_object_id -->
 			<cfquery name="part_name_all" datasource="user_login" username="#session.dbuser#" password="#decrypt(session.epw,session.sessionKey)#">
-				select p.part_name 
-				from specimen_part p 
+				select p.part_name
+				from specimen_part p
 					LEFT JOIN ctspecimen_part_list_order c ON (p.part_name = c.partname)
 				where p.derived_from_cat_item = #collection_object_id#
-				order by c.list_order					
+				order by c.list_order
 			</cfquery>
-			
+
 			<!-- put query from above into a list-->
 			<cfset parts = "">
 			<cfloop query="part_name_all">

		<cfset formatted_sex = "#ReplaceNoCase(formatted_sex, 'male', 'M')#">

		<cfset sexAr[i] = "#formatted_sex#">
		
		<cfset i = i+1>
	</cfloop>
	
	<cfset temp = queryAddColumn(q, "geography", "VarChar", geogAr)>
	<cfset temp = queryAddColumn(q, "agent", "VarChar", collAr)>
	<cfset temp = queryAddColumn(q, "agent_id", "VarChar", colIdAr)>

				<cfset format_agents = "#format_agents# #cols#,">
			</cfif>
		</cfloop>

		<!-- Auxiliary variables for preparator loop. -->
		<cfset usedPrepId = false>
		<cfif preparatorId is "">
			<cfset usedPrepId = true>
		</cfif>

		<!-- This loop correctly formats all preparators. -->
		<cfloop list="#preparators#" delimiters="," index="preps">
			<cfif usedPrepId is false>
