Implemented hierarchy of goals and tasks