NC refactoring