Refactor app structure.