Updated comments and formatting