End-to-end functional version of app.