Finish refactoring inversion structure.