Added error and loading classes and allow to resolve multiple promises before bootstrapping.