Improve docs and refactore std::os.
return without allocating a new one vector
fixing indent in comments.