Goal Reasoning as Multilevel Planning