Refactored app structure