Optimizing the EnableModule task