improve app architecture