Shorten code lines in examples