Minor cleanup + fix convertDOMToTokens.

Change-Id: I1286476817669fa0f5964fa0cfdd93a33ae58ba7
Merge "Minor cleanup + fix convertDOMToTokens."