Fixed lifetime shadowing warnings
Small iterator cleanup