Adding code for layer-specific actions