Moving to tokenize

Tests pass.  Some of the stuff I changed might need refactoring.
@bifodus can you revert this back?