Refactoring smart path methods and classes