Begun cleaning up code a little. Fixed serial input. Got rid of mess from building nested if statements. Next is to make sure nested if structure is correct, then begin implementing the melody generating.