Docs cleanup
Trailing commas in array literals
Small fixes
Fix return values
Unneeded code, remove extract(), code style
Merge pull request #5779 from mrclay/cleanup

Some random cleanup work.