Minor document fixes and cosmetic code changes