app structure refactoring