merge of extensive changes, finally stable and coherent, into devel branch