layer: remove the unused code