Added scope debugging