Lots of fixes to expressions, especially CAST.