APP structure refactoring and improvement