DocBlock corrections and typo fixes

Signed-off-by: Graham Campbell <graham@mineuk.com>
Fixed some closure docblocks
Tweak how commands are queued.
Merge pull request #6822 from GrahamForks/5.0-cs

[5.0] CS Fixes And Minor Fixes