Index: /branches/feature-no-make-me/lib/MT.pm
===================================================================
--- /branches/feature-no-make-me/lib/MT.pm (revision 2702)
+++ /branches/feature-no-make-me/lib/MT.pm (revision 2723)
@@ -94,4 +94,10 @@
 <MT_TRANS phrase="http://www.sixapart.com/movabletype/">
 SLUG
+}
+
+sub build_id {
+    my $build_id = '__BUILD_ID__';
+    $build_id = '' if $build_id eq '__BUILD_' . 'ID__';
+    return $build_id;
 }
 
@@ -2068,4 +2074,5 @@
     $param->{language_tag} = substr($mt->current_language, 0, 2);
     $param->{language_encoding} = $mt->charset;
+    $param->{optimize_ui} = $mt->build_id && !$MT::DebugMode;
     if ($mt->isa('MT::App')) {
         if (my $author = $mt->user) {
Index: /branches/feature-no-make-me/tmpl/cms/include/chromeless_header.tmpl
===================================================================
--- /branches/feature-no-make-me/tmpl/cms/include/chromeless_header.tmpl (revision 2722)
+++ /branches/feature-no-make-me/tmpl/cms/include/chromeless_header.tmpl (revision 2723)
@@ -8,5 +8,5 @@
 <mt:setvarblock name="html_head" prepend="1">
     <link rel="icon" href="<$mt:var name="static_uri"$>images/favicon.ico" type="image/ico" />
-<mt:if name="mt_debug">
+<mt:unless name="optimize_ui">
     <link rel="stylesheet" href="<$mt:var name="static_uri"$>css/reset.css?v=<mt:var name="mt_version_id" escape="url">" type="text/css" />
     <link rel="stylesheet" href="<$mt:var name="static_uri"$>css/utilities.css?v=<mt:var name="mt_version_id" escape="url">" type="text/css" />
@@ -15,5 +15,5 @@
 <mt:else>
     <link rel="stylesheet" href="<$mt:var name="static_uri"$>css/simple.css?v=<mt:var name="mt_version_id" escape="url">" type="text/css" />
-</mt:if>
+</mt:unless>
 
     <!--[if IE]>
Index: /branches/feature-no-make-me/tmpl/cms/include/header.tmpl
===================================================================
--- /branches/feature-no-make-me/tmpl/cms/include/header.tmpl (revision 2722)
+++ /branches/feature-no-make-me/tmpl/cms/include/header.tmpl (revision 2723)
@@ -10,9 +10,9 @@
     <link type="application/atom+xml" rel="alternate" <mt:if name="feed_name">title="<mt:var name="feed_name" escape="html">" </mt:if>href="<mt:var name="feed_url" escape="html">" />
 </mt:if>
-<mt:if name="mt_debug">
+<mt:unless name="optimize_ui">
     <link rel="stylesheet" href="<$mt:var name="static_uri"$>styles.css?v=<mt:var name="mt_version_id" escape="url">" type="text/css" />
 <mt:else>
     <link rel="stylesheet" href="<$mt:var name="static_uri"$>css/main.css?v=<mt:var name="mt_version_id" escape="url">" type="text/css" />
-</mt:if>
+</mt:unless>
     <!--[if IE]>
     <link rel="stylesheet" href="<$mt:var name="static_uri"$>css/hacks/ie.css?v=<mt:var name="mt_version_id" escape="url">" type="text/css" />
@@ -24,5 +24,5 @@
     <link rel="stylesheet" href="<$mt:var name="static_uri"$>styles_<$mt:var name="local_lang_id"$>.css?v=<mt:var name="mt_version_id" escape="url">" />
 </mt:if>
-<mt:if name="mt_debug">
+<mt:unless name="optimize_ui">
     <script type="text/javascript" src="<$mt:var name="static_uri"$>js/common/Core.js?v=<mt:var name="mt_version_id" escape="url">"></script>
     <script type="text/javascript" src="<$mt:var name="static_uri"$>js/common/JSON.js?v=<mt:var name="mt_version_id" escape="url">"></script>
@@ -43,5 +43,5 @@
 <mt:else>
     <script type="text/javascript" src="<$mt:var name="static_uri"$>js/mt_core_compact.js?v=<mt:var name="mt_version_id" escape="url">"></script>
-</mt:if>
+</mt:unless>
     <script type="text/javascript">
         /* <![CDATA[ */
Index: /branches/feature-no-make-me/tmpl/cms/dialog/header.tmpl
===================================================================
--- /branches/feature-no-make-me/tmpl/cms/dialog/header.tmpl (revision 2722)
+++ /branches/feature-no-make-me/tmpl/cms/dialog/header.tmpl (revision 2723)
@@ -5,13 +5,13 @@
 <meta http-equiv="Content-Type" content="text/html; charset=<mt:var name="language_encoding">" />
 <title><mt:loop name="page_titles"><mt:var name="bc_name" escape="html"> | </mt:loop><mt:var name="mt_product_name"></title>
-<mt:if name="mt_debug">
+<mt:unless name="optimize_ui">
     <link rel="stylesheet" href="<$mt:var name="static_uri"$>styles.css?v=<mt:var name="mt_version_id" escape="url">" type="text/css" />
 <mt:else>
     <link rel="stylesheet" href="<$mt:var name="static_uri"$>css/main.css?v=<mt:var name="mt_version_id" escape="url">" type="text/css" />
-</mt:if>
+</mt:unless>
 <!--[if IE]>
 <link rel="stylesheet" href="<$mt:var name="static_uri"$>css/hacks/ie.css?v=<mt:var name="mt_version_id" escape="url">" type="text/css" />
 <![endif]-->
-<mt:if name="mt_debug">
+<mt:unless name="optimize_ui">
 <script type="text/javascript" src="<$mt:var name="static_uri"$>js/common/Core.js?v=<mt:var name="mt_version_id" escape="url">"></script>
 <script type="text/javascript" src="<$mt:var name="static_uri"$>js/common/Timer.js?v=<mt:var name="mt_version_id" escape="url">"></script>
@@ -32,5 +32,5 @@
 <mt:else>
 <script type="text/javascript" src="<$mt:var name="static_uri"$>js/mt_core_compact.js?v=<mt:var name="mt_version_id" escape="url">"></script>
-</mt:if>
+</mt:unless>
 <$mt:var name="html_head"$>
 <script type="text/javascript" src="<mt:var name="static_uri">mt.js"></script>
