fixed some comments and formatting