Minor code reformatting/reordering