Total refactoring