Refactoring: separated tokenization from other parsing tasks