More comments and formatting fixes