Generating tokens and optimized MML separately