refactoring the application into modules