Tokenization work on the binary format.
Move some tests in a test file.