refactor class directory