Consistent formatting of repeated code