API to hook to layer deletion