Cleanup (replace a for loop & list copy by a simple pop)