Added Debug switch
Merge branch 'Nir'