initApp now works synchronously