setup tool_dependency_dir and refactoring setup method