restructuring the architecture of app

restructuring the architecture of app