Refactoring GEC curve preprocessing