Simplifying waitForInitialization and related testes