Restructured the application for scalability