Localize code within block

Signed-off-by: Siddharth Vinothkumar <siddharth.vinothkumar@citrix.com>