Refactoring calculator