Refactoring to process module by module 5