Code duplication reduction in Tool.