Would you believe it if I said I thought of most of what I just typed yesterday? I like to work backwards. I think of an idea, then I ask why is that and keep going. But anyways there are still a lot of things I still need to think about but I can answer a few of your questions. The melody box doesn't go haywire it does exactly what is is programmed to do, but that may not be in the best interest of the people in the present day story. And yes the dragons are sentient and they do have magic.