3rd party code refactoring