Restructure application