refine basic app structure