Fix a build error; improve comments; avoid warnings