Pulled out token factory creation of tokenizing loop.