Preparing token generation