comments and minor fixes for gcc warnings