Fixes to editor; added util function to generate client-side unique IDs.