Add casts, better type checking, and automatic type conversions.