Minor tweaks, now it basically works.
Metadata update via JS