Removes all the asInstanceOf's