Fixed i228

http://gsd.uwaterloo.ca:8888/question/952/resolve-types-for-this-and-parent-expressions

and other such fixes
Fixed some bugs from previous commit