Use context stack.

Signed-off-by: Toha <tohenk@yahoo.com>