Added support for local variable handling