merge common code
Authored by: Jean-Francois Dockes 2016-11-14
Parent(s): [90d49c]
Child(ren): [57c492]