Factor out token templates into separate module