Index: wp-content/themes/twentyten/functions.php
===================================================================
--- wp-content/themes/twentyten/functions.php	(revision 13142)
+++ wp-content/themes/twentyten/functions.php	(working copy)
@@ -6,7 +6,7 @@
 // Your Changeable header business starts here
 // No CSS, just IMG call
 define( 'HEADER_TEXTCOLOR', '');
-define( 'HEADER_IMAGE', '%s/images/header-1.jpg'); // %s is theme dir uri
+define( 'HEADER_IMAGE', '%s/images/header-1.jpg' ); // %s is theme dir uri
 define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width',  940 ) );
 define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height',  198 ) );
 define( 'NO_HEADER_TEXT', true );
@@ -65,7 +65,34 @@
 }
 add_filter( 'excerpt_more', 'twentyten_new_excerpt_more' );
 
+// Enqueue the CSS stylesheets
+function twentyten_enqueue_styles() {
+	if ( !is_admin() ) {
+		wp_enqueue_style( 'twentyten_style', get_bloginfo( 'stylesheet_url' ) );
+		wp_enqueue_style( 'twentyten_print', get_stylesheet_directory_uri() . '/print.css', null, false, 'print' );
+	}
+}
+add_action( 'init', 'twentyten_enqueue_styles' );
 
+
+// Enqueues the javascript for comment replys
+function twentyten_enqueue_scripts() {
+	if ( is_singular() and get_site_option('thread_comments') )
+		wp_print_scripts( 'comment-reply' );
+}
+add_action( 'wp_head', 'twentyten_enqueue_scripts' );
+
+// Displays the post thumbnail image on singular pages. All other pages get the header image.
+function twentyten_header_image() {
+	global $post;
+	if ( is_singular() && has_post_thumbnail( $post->ID ) ) {
+		echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
+	} else { ?>
+		<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
+		<?php
+	}
+}
+
 // Template for comments and pingbacks
 function twentyten_list_comment( $comment, $args, $depth ) {
 	$GLOBALS['comment'] = $comment; ?>
Index: wp-content/themes/twentyten/header.php
===================================================================
--- wp-content/themes/twentyten/header.php	(revision 13142)
+++ wp-content/themes/twentyten/header.php	(working copy)
@@ -20,11 +20,7 @@
 	<meta http-equiv="content-type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
 
 	<link rel="profile" href="http://gmpg.org/xfn/11" />
-	<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('stylesheet_url'); ?>" />
-	<link rel="stylesheet" type="text/css" media="print" href="<?php bloginfo('stylesheet_directory'); ?>/print.css" />
-
-	<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
-
+	
 	<?php wp_head(); ?>
 
 	<link rel="alternate" type="application/rss+xml" href="<?php bloginfo( 'rss2_url' ); ?>" title="<?php printf( esc_attr__( '%s latest posts', 'twentyten' ), esc_html( get_bloginfo('name') ) ); ?>" />
@@ -42,12 +38,7 @@
 				<div id="site-title"><span><a href="<?php echo home_url('/'); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></div>
 				<div id="site-description"><?php bloginfo( 'description' ); ?></div>
 
-				<?php
-				if ( is_singular() && has_post_thumbnail( $post->ID ) ) {
-					echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
-				} else { ?>
-					<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
-				<?php } ?>
+				<?php twentyten_header_image(); ?>
 			</div><!-- #branding -->
 
 			<div id="access">
