Merge my master branch

As agreed, the commits are quite atomic and small. More to come.
I guess the pattern is quite common and can save on temporary variables.