refactoring class translation.