Clean up code after upstream refactor.