Pull methods out of node types.

The goal is to make them pure data types and not have any methods on them in the future.
When scanning tokens, don't copy the document text over for each token.