Fixed extra iteration in various for loops
Fixed issues #1, #2, #3, #4
Merge pull request #12 from jorio/fix-sound

Fix sound (issues #1, #2, #3, #4)