Restructured main bootstrap file so it can be loaded in node