Refactoring inside a module