Index: wp-includes/post-template.php
===================================================================
--- wp-includes/post-template.php	(revision 15489)
+++ wp-includes/post-template.php	(working copy)
@@ -12,24 +12,21 @@
  * Display the ID of the current item in the WordPress Loop.
  *
  * @since 0.71
- * @uses $id
  */
 function the_ID() {
-	global $id;
-	echo $id;
+	echo get_the_ID();
 }
 
 /**
  * Retrieve the ID of the current item in the WordPress Loop.
  *
  * @since 2.1.0
- * @uses $id
  *
- * @return unknown
+ * @return int
  */
 function get_the_ID() {
-	global $id;
-	return $id;
+	global $post;
+	return $post->ID;
 }
 
 /**
@@ -181,7 +178,7 @@
  * @return string
  */
 function get_the_content($more_link_text = null, $stripteaser = 0) {
-	global $id, $post, $more, $page, $pages, $multipage, $preview;
+	global $post, $more, $page, $pages, $multipage, $preview;
 
 	if ( null === $more_link_text )
 		$more_link_text = __( '(more...)' );
@@ -216,10 +213,10 @@
 	$output .= $teaser;
 	if ( count($content) > 1 ) {
 		if ( $more ) {
-			$output .= '<span id="more-' . $id . '"></span>' . $content[1];
+			$output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
 		} else {
 			if ( ! empty($more_link_text) )
-				$output .= apply_filters( 'the_content_more_link', ' <a href="' . get_permalink() . "#more-$id\" class=\"more-link\">$more_link_text</a>", $more_link_text );
+				$output .= apply_filters( 'the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">$more_link_text</a>", $more_link_text );
 			$output = force_balance_tags($output);
 		}
 
Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revision 15489)
+++ wp-includes/post.php	(working copy)
@@ -1267,10 +1267,8 @@
  * @return array
  */
 function get_post_custom($post_id = 0) {
-	global $id;
-
 	if ( !$post_id )
-		$post_id = (int) $id;
+		$post_id = get_the_ID();
 
 	$post_id = (int) $post_id;
 
@@ -1335,13 +1333,11 @@
  * @return bool Whether post is sticky.
  */
 function is_sticky($post_id = null) {
-	global $id;
+	if ( !$post_id )
+		$post_id = get_the_ID();
 
 	$post_id = absint($post_id);
 
-	if ( !$post_id )
-		$post_id = absint($id);
-
 	$stickies = get_option('sticky_posts');
 
 	if ( !is_array($stickies) )
Index: wp-includes/comment-template.php
===================================================================
--- wp-includes/comment-template.php	(revision 15489)
+++ wp-includes/comment-template.php	(working copy)
@@ -545,12 +545,11 @@
  * @return int The number of comments a post has
  */
 function get_comments_number( $post_id = 0 ) {
-	global $id;
-	$post_id = (int) $post_id;
-
 	if ( !$post_id )
-		$post_id = (int) $id;
+		$post_id = get_the_ID();
 
+	$post_id = absint($post_id);
+
 	$post = get_post($post_id);
 	if ( ! isset($post->comment_count) )
 		$count = 0;
@@ -564,7 +563,6 @@
  * Display the language string for the number of comments the current post has.
  *
  * @since 0.71
- * @uses $id
  * @uses apply_filters() Calls the 'comments_number' hook on the output and number of comments respectively.
  *
  * @param string $zero Text for no comments
@@ -573,12 +571,10 @@
  * @param string $deprecated Not used.
  */
 function comments_number( $zero = false, $one = false, $more = false, $deprecated = '' ) {
-	global $id;
-
 	if ( !empty( $deprecated ) )
 		_deprecated_argument( __FUNCTION__, '1.3' );
 
-	$number = get_comments_number($id);
+	$number = get_comments_number(get_the_ID());
 
 	if ( $number > 1 )
 		$output = str_replace('%', number_format_i18n($number), ( false === $more ) ? __('% Comments') : $more);
@@ -703,16 +699,14 @@
  *
  * @since 1.5.0
  * @uses apply_filters() Calls 'trackback_url' on the resulting trackback URL
- * @uses $id
  *
  * @return string The trackback URL after being filtered
  */
 function get_trackback_url() {
-	global $id;
 	if ( '' != get_option('permalink_structure') ) {
 		$tb_url = trailingslashit(get_permalink()) . user_trailingslashit('trackback', 'single_trackback');
 	} else {
-		$tb_url = get_option('siteurl') . '/wp-trackback.php?p=' . $id;
+		$tb_url = get_option('siteurl') . '/wp-trackback.php?p=' . get_the_ID();
 	}
 	return apply_filters('trackback_url', $tb_url);
 }
@@ -844,7 +838,6 @@
  * @since 1.5.0
  * @global array $comment List of comment objects for the current post
  * @uses $wpdb
- * @uses $id
  * @uses $post
  * @uses $withcomments Will not try to get the comments if the post has none.
  *
@@ -961,7 +954,6 @@
  * lists of posts
  *
  * @since 0.71
- * @uses $id
  * @uses $wpcommentspopupfile
  * @uses $wpcommentsjavascript
  * @uses $post
@@ -974,8 +966,10 @@
  * @return null Returns null on single posts and pages.
  */
 function comments_popup_link( $zero = false, $one = false, $more = false, $css_class = '', $none = false ) {
-	global $id, $wpcommentspopupfile, $wpcommentsjavascript;
+	global $wpcommentspopupfile, $wpcommentsjavascript;
 
+	$id = get_the_ID();
+
 	if ( false === $zero ) $zero = __( 'No Comments' );
 	if ( false === $one ) $one = __( '1 Comment' );
 	if ( false === $more ) $more = __( '% Comments' );
@@ -1168,7 +1162,7 @@
  * @return string Hidden input HTML for replying to comments
  */
 function get_comment_id_fields() {
-	global $id;
+	$id = get_the_ID();
 
 	$replytoid = isset($_GET['replytocom']) ? (int) $_GET['replytocom'] : 0;
 	$result  = "<input type='hidden' name='comment_post_ID' value='$id' id='comment_post_ID' />\n";
Index: wp-includes/post-thumbnail-template.php
===================================================================
--- wp-includes/post-thumbnail-template.php	(revision 15489)
+++ wp-includes/post-thumbnail-template.php	(working copy)
@@ -18,8 +18,7 @@
  * @return bool Whether post has an image attached.
  */
 function has_post_thumbnail( $post_id = NULL ) {
-	global $id;
-	$post_id = ( NULL === $post_id ) ? $id : $post_id;
+	$post_id = ( NULL === $post_id ) ? get_the_ID() : $post_id;
 	return !! get_post_thumbnail_id( $post_id );
 }
 
@@ -32,8 +31,7 @@
  * @return int
  */
 function get_post_thumbnail_id( $post_id = NULL ) {
-	global $id;
-	$post_id = ( NULL === $post_id ) ? $id : $post_id;
+	$post_id = ( NULL === $post_id ) ? get_the_ID() : $post_id;
 	return get_post_meta( $post_id, '_thumbnail_id', true );
 }
 
@@ -59,8 +57,7 @@
  * @param string|array $attr Optional. Query string or array of attributes.
  */
 function get_the_post_thumbnail( $post_id = NULL, $size = 'post-thumbnail', $attr = '' ) {
-	global $id;
-	$post_id = ( NULL === $post_id ) ? $id : $post_id;
+	$post_id = ( NULL === $post_id ) ? get_the_ID() : $post_id;
 	$post_thumbnail_id = get_post_thumbnail_id( $post_id );
 	$size = apply_filters( 'post_thumbnail_size', $size );
 	if ( $post_thumbnail_id ) {
@@ -73,4 +70,4 @@
 	return apply_filters( 'post_thumbnail_html', $html, $post_id, $post_thumbnail_id, $size, $attr );
 }
 
-?>
\ No newline at end of file
+?>
Index: wp-includes/link-template.php
===================================================================
--- wp-includes/link-template.php	(revision 15489)
+++ wp-includes/link-template.php	(working copy)
@@ -462,10 +462,10 @@
  * @return string
  */
 function get_post_comments_feed_link($post_id = '', $feed = '') {
-	global $id;
+	if ( !$post_id )
+		$post_id = get_the_ID();
 
-	if ( empty($post_id) )
-		$post_id = (int) $id;
+	$post_id = absint($post_id);
 
 	if ( empty($feed) )
 		$feed = get_default_feed();
