Removed the defaults directory per suggestion of Leszek Zyczkowski
changed foreach loops to for