Change loop type
Remove unused
Fix path