Grand revision (before v1)
Revised on the basis of Antal's comments