new state manager approach for editing layer (still broken)