Index: wp-content/themes/twentyten/search.php
===================================================================
--- wp-content/themes/twentyten/search.php	(revision 13142)
+++ wp-content/themes/twentyten/search.php	(working copy)
@@ -5,7 +5,7 @@
 
 <?php if ( have_posts() ) : ?>
 				<h1 class="page-title"><?php _e( 'Search Results for: ', 'twentyten' ); ?><span><?php the_search_query(); ?></span></h1>
-	<?php include 'loop.php'; ?>
+	<?php twentyten_get_loop_template(); ?>
 <?php else : ?>
 				<div id="post-0" class="post no-results not-found">
 					<h2 class="entry-title"><?php _e( 'Nothing Found', 'twentyten' ); ?></h2>
Index: wp-content/themes/twentyten/index.php
===================================================================
--- wp-content/themes/twentyten/index.php	(revision 13142)
+++ wp-content/themes/twentyten/index.php	(working copy)
@@ -4,7 +4,7 @@
 			<div id="content">
 
     <?php if ( have_posts() ) : 
-		include 'loop.php';
+		twentyten_get_loop_template();
     else : ?>
 		<h2><?php _e( 'Not Found', 'twentyten' ); ?></h2>
 		<div class="entry-content">
Index: wp-content/themes/twentyten/functions.php
===================================================================
--- wp-content/themes/twentyten/functions.php	(revision 13142)
+++ wp-content/themes/twentyten/functions.php	(working copy)
@@ -3,6 +3,9 @@
 // Set the content width based on the Theme CSS
 $content_width = apply_filters( 'twentyten_content_width', 640 );
 
+// Enables automatic general feed link outputting
+automatic_feed_links();
+
 // Your Changeable header business starts here
 // No CSS, just IMG call
 define( 'HEADER_TEXTCOLOR', '');
@@ -46,10 +49,29 @@
 if ( is_readable($locale_file) )
 	require_once( $locale_file );
 
+// Gets the correct document title for the page
+function twentyten_title( $sep = '|' ) {
+	if ( is_single() ) {
+		$title = sprintf( '%1$s %2$s %3$s', single_post_title( '', false ), $sep, get_bloginfo( 'name' ) );
+	} elseif ( is_home() || is_front_page() ) {
+		$title = sprintf( '%1$s %2$s %3$s %4$s', get_bloginfo( 'name' ), $sep, get_bloginfo( 'description' ), twentyten_get_page_number($sep) );
+	} elseif ( is_page() ) {
+		$title = sprintf( '%1$s %2$s %3$s', single_post_title( '', false ), $sep, get_bloginfo( 'name' ) );
+	} elseif ( is_search() ) {
+		$title = sprintf( __('Search results for "%1$s" | %2$s %3$s', 'twentyten'), esc_attr(get_search_query()), twentyten_get_page_number($sep), get_bloginfo('name') );
+	} elseif ( is_404() ) {
+		$title = sprintf( __( 'Not Found %1$s %2$s', 'twentyten' ), $sep, get_bloginfo( 'name' ) );
+	} else {
+		$title = sprintf( '%1$s | %2$s %3$s', wp_title(''), get_bloginfo('name'), twentyten_get_page_number($sep) );
+	}
+	
+	echo apply_filters( 'twentyten_title', $title );
+}
+
 // Get the page number
-function twentyten_get_page_number() {
+function twentyten_get_page_number( $sep = '|' ) {
 	if ( get_query_var('paged') )
-		echo ' | ' . __( 'Page ' , 'twentyten' ) . get_query_var('paged');
+		return apply_filters( 'twentyten_get_page_number', sprintf( __( ' %s Page ' , 'twentyten' ), $sep, get_query_var('paged') ) );
 }
 
 // Control excerpt length
@@ -116,41 +138,11 @@
 add_filter( 'gallery_style', 'twentyten_remove_gallery_css' );
 
 
-// For category lists on category archives: Returns other categories except the current one (redundant)
-function cats_meow( $glue ) {
-	$current_cat = single_cat_title( '', false );
-	$separator = "\n";
-	$cats = explode( $separator, get_the_category_list($separator) );
-	foreach ( $cats as $i => $str ) {
-		if ( strstr( $str, ">$current_cat<" ) ) {
-			unset( $cats[$i] );
-			break;
-		}
-	}
-	if ( empty($cats) )
-		return false;
+// Loads the loop.php template
+function twentyten_get_loop_template() {
+	locate_template( 'loop', true );
+}
 
-	return trim( join( $glue, $cats ) );
-} // end cats_meow
-
-
-// For tag lists on tag archives: Returns other tags except the current one (redundant)
-function tag_ur_it( $glue ) {
-	$current_tag = single_tag_title( '', '',  false );
-	$separator = "\n";
-	$tags = explode( $separator, get_the_tag_list( "", "$separator", "" ) );
-	foreach ( $tags as $i => $str ) {
-		if ( strstr( $str, ">$current_tag<" ) ) {
-			unset( $tags[$i] );
-			break;
-		}
-	}
-	if ( empty($tags) )
-		return false;
-
-	return trim( join( $glue, $tags ) );
-} // end tag_ur_it
-
 // Register widgetized areas
 function twentyten_widgets_init() {
 	// Area 1
Index: wp-content/themes/twentyten/tag.php
===================================================================
--- wp-content/themes/twentyten/tag.php	(revision 13142)
+++ wp-content/themes/twentyten/tag.php	(working copy)
@@ -9,7 +9,7 @@
 
 <?php rewind_posts(); ?>
 
-<?php include 'loop.php'; ?>
+<?php twentyten_get_loop_template(); ?>
 
 			</div><!-- #content -->
 		</div><!-- #container -->
Index: wp-content/themes/twentyten/category.php
===================================================================
--- wp-content/themes/twentyten/category.php	(revision 13142)
+++ wp-content/themes/twentyten/category.php	(working copy)
@@ -10,7 +10,7 @@
 
 <?php rewind_posts(); ?>
 
-<?php include 'loop.php'; ?>
+<?php twentyten_get_loop_template(); ?>
 
 			</div><!-- #content -->
 		</div><!-- #container -->
Index: wp-content/themes/twentyten/archive.php
===================================================================
--- wp-content/themes/twentyten/archive.php	(revision 13142)
+++ wp-content/themes/twentyten/archive.php	(working copy)
@@ -17,7 +17,7 @@
 
 <?php rewind_posts(); ?>
 
-<?php include 'loop.php'; ?>
+<?php twentyten_get_loop_template(); ?>
 
 			</div><!-- #content -->
 		</div><!-- #container -->
Index: wp-content/themes/twentyten/header.php
===================================================================
--- wp-content/themes/twentyten/header.php	(revision 13142)
+++ wp-content/themes/twentyten/header.php	(working copy)
@@ -1,21 +1,7 @@
 <!DOCTYPE html>
 <html <?php language_attributes(); ?>>
 <head>
-    <title><?php
-        if ( is_single() ) {
-			single_post_title(); echo ' | '; bloginfo('name');
-		} elseif ( is_home() || is_front_page() ) {
-			bloginfo('name'); echo ' | '; bloginfo('description'); twentyten_get_page_number();
-		} elseif ( is_page() ) {
-			single_post_title(''); echo ' | '; bloginfo('name');
-		} elseif ( is_search() ) {
-			printf(__('Search results for "%s"', 'twentyten'), esc_html($s)); twentyten_get_page_number(); echo ' | '; bloginfo('name'); 
-		} elseif ( is_404() ) {
-			_e('Not Found', 'twentyten'); echo ' | '; bloginfo('name');
-		} else {
-			wp_title(''); echo ' | '; bloginfo('name'); twentyten_get_page_number();
-		}
-    ?></title>
+    <title><?php twentyten_title(); ?></title>
 
 	<meta http-equiv="content-type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
 

