Improve app initialization
add example