Refactoring into a reasonable app structure