minor deletions and code reformatting