Share common code between EAP5 and EAP6