Elaboration of thought and goal-oriented behavior are functions of the prefrontal area of the brain.
Prefrontal cortex is in the front of the brain, and is responsible for one's personality, planning, complex behavior, decision making, and other behavioral actions.