Restructuring the application