finally stages of module refactoring