restructuring the application to be more module