(I moved most of this post to http://blog.andreas.com/2014/04/28/1025/ )