Part 1 of the update; don't trust the copy functions yet.
Intermediate crap state, will fix
Merge conflict resolve
Merge branch 'master' into dev-copy
token.dtype --> tree.dtypes[token]
Merge remote-tracking branch 'origin/temp-dev' into dev-copy
Round 2 of rewrite. Seems to work now.
one final apply_trans removed
Beam search