Refactored bar-system functions of addNote() some more, weird bug with illegal notes still appearing.