Changed type to type_ in Analysis and updated add_tool method