Removal of unnecessary casts.