Finish proper refactoring of public_app.