refactor reader API and add make* token functions