First commit of partially ported code of the master module from D7 to D8.