Code cleanup for tool_list