restructure application