Refactor of trap and killed one layer