Minor code style fixes and API docs improvements.
The array will be shared by both tasks, so it may be extracted.