refactored app structure for web app