Added script for compiling the branch indexes.
some small changes, and initial work on toplevel index.