Big ass refactor in preparation for pr
Refactor bootstrapping