Implement general casts and pointer dereferencing.

Prior to this casts and pointer dereferencing were special-cased.
3 files changed