Mastering Tree of Thoughts Agents: A Deep Dive