Refactored & optimized TrapManager