Fixes Scoping bugs

Fixes scoping bugs, removes unnecessary use of self.xx.

Change-Id: I0c9504a11d25cddb7f4e04eed2a631389297fdd9
Merge "Fixes Scoping bugs"