restructuring entire app