Removes useless casts