Move EOF to Buffer, do not pass document to Tokenizer
Move encodings from constants to json file
Add missing untracked files
Big refactoring

I'm sorry for this too big commit...