minor refactor in app init