Miscellaneous code reformatting