full restructure of app