Minor code cleanup, reformatting, and tweaks.