Changes to EDMLoop to incorporate new locks