code reformatting + cleanup comments