restructures app