Fix output logic, bug causing notes to be skipped
The old logic would skip a note or chord if it was the object that went
over the max line length. The logic is fixed and that entire section is
refactored.