fix edge-delete layer and add tests