Improved text generation