refactor for ToolType enum. fix imports for tests