Refactored remove cycle.