cleanup comments and formatting