Minor cleanups in the contents API.

Noticed while poking around the contents tree with a linter enabled.