Refactor

Apply uniform style of code where it was violated.
Reorder tests, group some of them.
Break TokenTest into different source files.