Fixed some bugs in inheritance, added a `parent` keyword.