Made some DOM fields private.

Relevant to #2242.