restructure app