clean up public api for embed code functionality