Improve completion generation