Minor code cleanup in a couple utilities.