Create tokenizer function and write bin scripts