Updated the build system and delt with warnings.

* Added an Android build system rule for StartupSummarizerKt
* Updated the README.md file
* Re-factored some code to eliminate a few warnings

Test: Built and ran StartupSummarizerKt
Change-Id: I7c64128f99f5bc5f3450b5a26a4c14ac4aeceee4
diff --git a/Android.bp b/Android.bp
index 6391fa0..fd46b5b 100644
--- a/Android.bp
+++ b/Android.bp
@@ -86,6 +86,19 @@
 }
 
 java_binary_host {
+    name: "StartupSummarizerKt",
+    defaults: ["trebuchet-defaults"],
+    manifest: "trebuchet/startup-summarizer/MANIFEST.mf",
+    srcs: [
+        "trebuchet/startup-summarizer/src/**/*.kt",
+    ],
+    static_libs: [
+        "trebuchet-core",
+        "trebuchet-startup-common"
+    ],
+}
+
+java_binary_host {
     name: "traceutils",
     defaults: ["trebuchet-defaults"],
     manifest: "trebuchet/traceutils/MANIFEST.mf",
diff --git a/README.md b/README.md
index e1b4968..b0f97aa 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,23 @@
-Trebuchet
+# Trebuchet
 
-A library for parsing & analyzing atrace files.
+Trebuchet is a Kotlin library for parsing and analyzing Android trace files generated by the `atrace` or `systrace` commands.  This is not an officially supported Google product.
 
-This is not an officially supported Google product.
+## Library
+
+The code for the Trebuchet library can be found in the `core/` directory.
+
+## Bundled Programs
+
+Trebuchet comes bundled with several programs for analyzing one or more trace files.
+
+### Startup Analyzer
+
+The Startup Analyzer program takes a trace file, detects any startup events that occurred during the traced time period, and prints information about the events.  If Trebuchet is built using the Android build system, there will be a StartupAnalyzerKt program placed into a directory that is a member of the PATH system variable.  If you wish to use Gradle, you can use the `startup-analyzer.sh` script located in the `scripts/` directory.
+
+### Startup Summarizer
+
+The Startup Summarizer program takes a set of trace files, detects startup events in each file, and computes average and standard deviation for startup stats, broken down by program name, compiler filter, and cache status.  If Trebuchet is built using the Android build system, there will be a StartupSummarizerKt program placed into a directory that is a member of the PATH system variable.  If you wish to use Gradle, you can use the `startup-summarizer.sh` script located in the `scripts/` directory.
+
+## Helper Scripts
+
+The `scripts/` directory contains a shell script called `run-startup.sh`, which will start a trace, launch an activity given a package name and an activity name, transfer the trace file to the host machine, and run the StartupAnalyzer.
diff --git a/core/common/src/main/kotlin/trebuchet/task/ImportTask.kt b/core/common/src/main/kotlin/trebuchet/task/ImportTask.kt
index 3b7df9e..dc62cc7 100644
--- a/core/common/src/main/kotlin/trebuchet/task/ImportTask.kt
+++ b/core/common/src/main/kotlin/trebuchet/task/ImportTask.kt
@@ -29,10 +29,8 @@
     private val fragments = mutableListOf<ModelFragment>()
 
     fun import(source: BufferProducer): Model {
-        var model: Model? = null
         extractOrImport(source)
-        model = finish()
-        return model!!
+        return finish()
     }
 
     private fun extractOrImport(stream: BufferProducer) {
diff --git a/trebuchet/startup-summarizer/MANIFEST.mf b/trebuchet/startup-summarizer/MANIFEST.mf
new file mode 100644
index 0000000..c1dc614
--- /dev/null
+++ b/trebuchet/startup-summarizer/MANIFEST.mf
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Main-Class: StartupSummarizerKt