array formatting, whitespace consistency, and other minor cleanups