Redo and cleanup the change replacing `unsafe*` with `toSing`