Some general clean-up of std::vec::raw

See commits for details.