rename document struct field, tighten things up