still debugging

Fixed bunch of scoping issues (this, that)