Fix key signature extra accidentals and address code review comments.