simplify app initialization code