Fixed some bugs, initialized tree of future states for the search