Necrocode from legacy gcm3d branches