Some small fixes. Now the notes generator works well, but very slow.