Refactoring calculator plugin