Restructure and ok function the app.