Ugly commit.

Most of this will go away and move directly into bbis repo.