Bootstrap

First cut of the bootstrap refactor.