Re-implements edit layer freezing, needs tests.