Safely remove layers - TODO