tighten up some security issues. Do not trust toHtml and toTag properties without first checking that they are trusted (e.g. either the tagsToHtml function, or a tags.toTag function). Also trust only tags.style styles, and whitelist all attributes
use slightly faster tags.append/prepend/empty/byId instead of jQuery for key list pieces of code
clean up list event listener setup