Remove an unused variable.
Add bounds checking to the notes frequency array. (dm)