Improve documentation for most functions that return an object