Restructures app.