Added License

Licensed work under Creative Commons Attribution-ShareAlike. Converted
for loop to a for each loop.