diff --git a/recovery.cpp b/recovery.cpp
index 7776f1f..bbfeda4 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -86,7 +86,6 @@
 
 RecoveryUI* ui = NULL;
 char* locale = NULL;
-char recovery_version[PROPERTY_VALUE_MAX+1];
 char* stage = NULL;
 char* reason = NULL;
 bool modified_flash = false;
@@ -516,24 +515,6 @@
     return result;
 }
 
-static const char** prepend_title(const char* const* headers) {
-    // count the number of lines in our title, plus the
-    // caller-provided headers.
-    int count = 3;   // our title has 3 lines
-    const char* const* p;
-    for (p = headers; *p; ++p, ++count);
-
-    const char** new_headers = (const char**)malloc((count+1) * sizeof(char*));
-    const char** h = new_headers;
-    *(h++) = "Android system recovery (API " EXPAND(RECOVERY_API_VERSION) ")";
-    *(h++) = recovery_version;
-    *(h++) = "";
-    for (p = headers; *p; ++p, ++h) *h = *p;
-    *h = NULL;
-
-    return new_headers;
-}
-
 static int
 get_menu_selection(const char* const * headers, const char* const * items,
                    int menu_only, int initial_selection, Device* device) {
@@ -814,7 +795,7 @@
 // on if the --shutdown_after flag was passed to recovery.
 static Device::BuiltinAction
 prompt_and_wait(Device* device, int status) {
-    const char* const* headers = prepend_title(device->GetMenuHeaders());
+    const char* const* headers = device->GetMenuHeaders();
 
     for (;;) {
         finish_recovery(NULL);
@@ -1057,9 +1038,14 @@
     printf("\n");
 
     property_list(print_property, NULL);
-    property_get("ro.build.display.id", recovery_version, "");
     printf("\n");
 
+    char recovery_build[PROPERTY_VALUE_MAX];
+    property_get("ro.build.display.id", recovery_build, "");
+
+    ui->Print("%s\n", recovery_build);
+    ui->Print("Supported API: %d\n", RECOVERY_API_VERSION);
+
     int status = INSTALL_SUCCESS;
 
     if (update_package != NULL) {
