Use torque types

and appropriate static_casts