Reimplement LayerStack.