Fixed 'cast as' etc. binary operators

All binary and unary operators now work as expected, although there may
be some problems with expressions like "a intsance of b instance of c".